[llvm] eee22ec - [X86MCTargetDesc.h] Speculative fix for macro collision with sys/param.h

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 10:53:58 PST 2020


Author: Vedant Kumar
Date: 2020-02-25T10:52:37-08:00
New Revision: eee22ec3c3712a1089cbdbe66ccf36dd89be507a

URL: https://github.com/llvm/llvm-project/commit/eee22ec3c3712a1089cbdbe66ccf36dd89be507a
DIFF: https://github.com/llvm/llvm-project/commit/eee22ec3c3712a1089cbdbe66ccf36dd89be507a.diff

LOG: [X86MCTargetDesc.h] Speculative fix for macro collision with sys/param.h

See discussion on https://reviews.llvm.org/D75091 for information about
the build failure and alternatives considered.

Added: 
    

Modified: 
    llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
index 0c789061f0e1..ce28eaedcfc8 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
@@ -125,6 +125,10 @@ MCRegister getX86SubSuperRegisterOrZero(MCRegister, unsigned,
 
 } // End llvm namespace
 
+// Some Unix systems define an FSCALE macro in sys/param.h. This macro somehow
+// gets pulled into this header when -fmodules is enabled, preventing us from
+// textually including X86GenInstrInfo.inc.
+#undef FSCALE
 
 // Defines symbolic names for X86 registers.  This defines a mapping from
 // register name to register number.


        


More information about the llvm-commits mailing list