[PATCH] D75091: [modulemap] Speculative fix for macro collision with sys/param.h

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 16:27:42 PST 2020


vsk created this revision.
vsk added reviewers: aprantl, bruno, teemperor, rsmith.
Herald added a subscriber: dexonsmith.
Herald added a project: LLVM.

This is a speculative fix for the following modules build failure:

  $ ... -c /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
  In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp:17:
  In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Target/X86/X86InstrInfo.h:16:
  In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h:19:
  In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h:139:
  lib/Target/X86/X86GenInstrInfo.inc:1029:5: error: expected identifier
      FSCALE      = 1014,
      ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/param.h:251:16: note: expanded from macro 'FSCALE'
  #define FSCALE  (1<<FSHIFT)
                  ^
  1 error generated.

http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/10254

I'm really not sure what's going on here or whether the fix is appropriate,
any guidance very much appreciated!

rdar://59740397


https://reviews.llvm.org/D75091

Files:
  llvm/include/llvm/module.modulemap


Index: llvm/include/llvm/module.modulemap
===================================================================
--- llvm/include/llvm/module.modulemap
+++ llvm/include/llvm/module.modulemap
@@ -39,6 +39,8 @@
 module LLVM_Backend_Target {
   umbrella "Target"
   module * { export * }
+
+  exclude header "Target/X86/X86GenInstrInfo.inc"
 }
 
 module LLVM_Bitcode {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75091.246339.patch
Type: text/x-patch
Size: 363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/213aef08/attachment.bin>


More information about the llvm-commits mailing list