MultiFormatConfig.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //===- MultiFormatConfig.h --------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLVM_TOOLS_LLVM_OBJCOPY_MULTIFORMATCONFIG_H
  9. #define LLVM_TOOLS_LLVM_OBJCOPY_MULTIFORMATCONFIG_H
  10. #include "llvm/Support/Error.h"
  11. namespace llvm {
  12. namespace objcopy {
  13. struct CommonConfig;
  14. struct ELFConfig;
  15. struct COFFConfig;
  16. struct MachOConfig;
  17. struct WasmConfig;
  18. class MultiFormatConfig {
  19. public:
  20. virtual ~MultiFormatConfig() {}
  21. virtual const CommonConfig &getCommonConfig() const = 0;
  22. virtual Expected<const ELFConfig &> getELFConfig() const = 0;
  23. virtual Expected<const COFFConfig &> getCOFFConfig() const = 0;
  24. virtual Expected<const MachOConfig &> getMachOConfig() const = 0;
  25. virtual Expected<const WasmConfig &> getWasmConfig() const = 0;
  26. };
  27. } // namespace objcopy
  28. } // namespace llvm
  29. #endif // LLVM_TOOLS_LLVM_OBJCOPY_MULTIFORMATCONFIG_H