Skip to content

MC: Move ExceptionHandling enum to Support #144692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Jun 18, 2025

Similar to b596726, we need
to use this in RuntimeLibcalls to compute the set of library
calls.

Copy link
Contributor Author

arsenm commented Jun 18, 2025

@llvmbot
Copy link
Member

llvmbot commented Jun 18, 2025

@llvm/pr-subscribers-llvm-support

Author: Matt Arsenault (arsenm)

Changes

Similar to b596726, we need
to use this in RuntimeLibcalls to compute the set of library
calls.


Full diff: https://github.com/llvm/llvm-project/pull/144692.diff

2 Files Affected:

  • (modified) llvm/include/llvm/MC/MCTargetOptions.h (+1-12)
  • (modified) llvm/include/llvm/Support/CodeGen.h (+12)
diff --git a/llvm/include/llvm/MC/MCTargetOptions.h b/llvm/include/llvm/MC/MCTargetOptions.h
index 3ee21d9cda4b7..d95adf92b9a83 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 90733b50385a9..cd1f9167b996d 100644
--- a/llvm/include/llvm/Support/CodeGen.h
+++ b/llvm/include/llvm/Support/CodeGen.h
@@ -50,6 +50,18 @@ 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.
+  };
+
   namespace FloatABI {
   enum ABIType {
     Default, // Target-specific (either soft or hard depending on triple, etc).

@arsenm arsenm force-pushed the users/arsenm/mc/move-exception-handling-to-support branch from dfb15b7 to 762a6b4 Compare June 19, 2025 01:32
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/construct-from-float-abi-eabi-optios branch from 3bf268a to 1011a26 Compare June 19, 2025 01:32
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor Author

arsenm commented Jun 19, 2025

Merge activity

  • Jun 19, 9:57 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 19, 10:03 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 19, 10:05 AM UTC: @arsenm merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/construct-from-float-abi-eabi-optios branch from 1011a26 to 4b38ca2 Compare June 19, 2025 09:59
Base automatically changed from users/arsenm/runtime-libcalls/construct-from-float-abi-eabi-optios to main June 19, 2025 10:02
Similar to b596726, we need
to use this in RuntimeLibcalls to compute the set of library
calls.
@arsenm arsenm force-pushed the users/arsenm/mc/move-exception-handling-to-support branch from 762a6b4 to 83bf964 Compare June 19, 2025 10:02
@arsenm arsenm merged commit 305953a into main Jun 19, 2025
5 of 7 checks passed
@arsenm arsenm deleted the users/arsenm/mc/move-exception-handling-to-support branch June 19, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants