MC: Move ExceptionHandling enum to Support (#144692)
Similar to b5967264b0fbfd502b3a7edec27409e966fb68be, we need
to use this in RuntimeLibcalls to compute the set of library
calls.
diff --git a/llvm/include/llvm/MC/MCTargetOptions.h b/llvm/include/llvm/MC/MCTargetOptions.h
index 3ee21d9..d95adf9 100644
--- a/llvm/include/llvm/MC/MCTargetOptions.h
+++ b/llvm/include/llvm/MC/MCTargetOptions.h
@@ -10,6 +10,7 @@
#define LLVM_MC_MCTARGETOPTIONS_H
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Compression.h"
#include <string>
@@ -17,18 +18,6 @@
namespace llvm {
-enum class ExceptionHandling {
- None, ///< No exception support
- DwarfCFI, ///< DWARF-like instruction based exceptions
- SjLj, ///< setjmp/longjmp based exceptions
- ARM, ///< ARM EHABI
- WinEH, ///< Windows Exception Handling
- Wasm, ///< WebAssembly Exception Handling
- AIX, ///< AIX Exception Handling
- ZOS, ///< z/OS MVS Exception Handling. Very similar to DwarfCFI, but the PPA1
- ///< is used instead of an .eh_frame section.
-};
-
enum class EmitDwarfUnwindType {
Always, // Always emit dwarf unwind
NoCompactUnwind, // Only emit if compact unwind isn't available
diff --git a/llvm/include/llvm/Support/CodeGen.h b/llvm/include/llvm/Support/CodeGen.h
index 90733b5..cd1f916 100644
--- a/llvm/include/llvm/Support/CodeGen.h
+++ b/llvm/include/llvm/Support/CodeGen.h
@@ -50,6 +50,18 @@
};
}
+ enum class ExceptionHandling {
+ None, ///< No exception support
+ DwarfCFI, ///< DWARF-like instruction based exceptions
+ SjLj, ///< setjmp/longjmp based exceptions
+ ARM, ///< ARM EHABI
+ WinEH, ///< Windows Exception Handling
+ Wasm, ///< WebAssembly Exception Handling
+ AIX, ///< AIX Exception Handling
+ ZOS, ///< z/OS MVS Exception Handling. Very similar to DwarfCFI, but the
+ ///< PPA1 is used instead of an .eh_frame section.
+ };
+
namespace FloatABI {
enum ABIType {
Default, // Target-specific (either soft or hard depending on triple, etc).