[llvm] [SystemZ][z/OS] yaml2obj GOFF symbols (PR #75971)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 02:06:27 PDT 2024


================
@@ -193,27 +165,25 @@ void ScalarEnumerationTraits<GOFFYAML::GOFF_ESDALIGNMENT>::enumeration(
   ECase(ESD_ALIGN_1024byte);
   ECase(ESD_ALIGN_2Kpage);
   ECase(ESD_ALIGN_4Kpage);
-#undef ECase
   IO.enumFallback<Hex8>(Value);
 }
 
 void ScalarBitSetTraits<GOFFYAML::GOFF_BAFLAGS>::bitset(
     IO &IO, GOFFYAML::GOFF_BAFLAGS &Value) {
-#define BCase(X) IO.bitSetCase(Value, #X, GOFF::X)
-#define BCaseMask(X, M) IO.maskedBitSetCase(Value, #X, GOFF::X, GOFF::M)
   BCase(ESD_BA_Movable);
   BCase(ESD_BA_ReadOnly);
   BCase(ESD_BA_NoPrime);
   BCase(ESD_BA_COMMON);
   BCase(ESD_BA_Indirect);
+}
 #undef BCase
 #undef BCaseMask
-}
+#undef ECase
----------------
jh7370 wrote:

On further review, is it actually necessary to `#undef` these? This is a .cpp, so the definitions are contained to this one file.

https://github.com/llvm/llvm-project/pull/75971


More information about the llvm-commits mailing list