- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
Description
I stopped using local llvm 3.6 on ARM many months ago but needed to use it again today. It doesn't work:
compile: arm-unknown-linux-gnueabihf/rustllvm/PassWrapper.o
/rust-master/src/rustllvm/PassWrapper.cpp: In function ‘bool LLVMRustHasFeature(LLVMTargetMachineRef, const char*)’:
/rust-master/src/rustllvm/PassWrapper.cpp:149:45: error: ‘class llvm::TargetMachine’ has no member named ‘getMCSubtargetInfo’
     const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
                                             ^
/rust-master/src/rustllvm/PassWrapper.cpp:150:11: error: ‘FeatureBitset’ does not name a type
     const FeatureBitset &Bits = MCInfo->getFeatureBits();
           ^
/rust-master/src/rustllvm/PassWrapper.cpp:154:53: error: passing ‘const llvm::MCSubtargetInfo’ as ‘this’ argument of ‘bool llvm::MCSubtargetInfo::isCPUStringValid(llvm::StringRef)’ discards qualifiers [-fpermissive]
     if (MCInfo->isCPUStringValid(x##SubTypeKV[0].Key)) {    \
                                                     ^
/rust-master/src/rustllvm/PassWrapper.cpp:101:23: note: in expansion of macro ‘SUBTARGET’
 #define SUBTARGET_X86 SUBTARGET(X86)
                       ^
/rust-master/src/rustllvm/PassWrapper.cpp:131:9: note: in expansion of macro ‘SUBTARGET_X86’
         SUBTARGET_X86     \
         ^
/rust-master/src/rustllvm/PassWrapper.cpp:158:5: note: in expansion of macro ‘GEN_SUBTARGETS’
     GEN_SUBTARGETS {
     ^
/rust-master/src/rustllvm/PassWrapper.cpp:154:53: error: passing ‘const llvm::MCSubtargetInfo’ as ‘this’ argument of ‘bool llvm::MCSubtargetInfo::isCPUStringValid(llvm::StringRef)’ discards qualifiers [-fpermissive]
     if (MCInfo->isCPUStringValid(x##SubTypeKV[0].Key)) {    \
                                                     ^
/rust-master/src/rustllvm/PassWrapper.cpp:107:23: note: in expansion of macro ‘SUBTARGET’
 #define SUBTARGET_ARM SUBTARGET(ARM)
                       ^
/rust-master/src/rustllvm/PassWrapper.cpp:132:9: note: in expansion of macro ‘SUBTARGET_ARM’
         SUBTARGET_ARM     \
         ^
/rust-master/src/rustllvm/PassWrapper.cpp:158:5: note: in expansion of macro ‘GEN_SUBTARGETS’
     GEN_SUBTARGETS {
     ^
/rust-master/src/rustllvm/PassWrapper.cpp:154:53: error: passing ‘const llvm::MCSubtargetInfo’ as ‘this’ argument of ‘bool llvm::MCSubtargetInfo::isCPUStringValid(llvm::StringRef)’ discards qualifiers [-fpermissive]
     if (MCInfo->isCPUStringValid(x##SubTypeKV[0].Key)) {    \
                                                     ^
/rust-master/src/rustllvm/PassWrapper.cpp:113:27: note: in expansion of macro ‘SUBTARGET’
 #define SUBTARGET_AARCH64 SUBTARGET(AArch64)
                           ^
/rust-master/src/rustllvm/PassWrapper.cpp:133:9: note: in expansion of macro ‘SUBTARGET_AARCH64’
         SUBTARGET_AARCH64 \
         ^
/rust-master/src/rustllvm/PassWrapper.cpp:158:5: note: in expansion of macro ‘GEN_SUBTARGETS’
     GEN_SUBTARGETS {
     ^
/rust-master/src/rustllvm/PassWrapper.cpp:154:53: error: passing ‘const llvm::MCSubtargetInfo’ as ‘this’ argument of ‘bool llvm::MCSubtargetInfo::isCPUStringValid(llvm::StringRef)’ discards qualifiers [-fpermissive]
     if (MCInfo->isCPUStringValid(x##SubTypeKV[0].Key)) {    \
                                                     ^
/rust-master/src/rustllvm/PassWrapper.cpp:119:24: note: in expansion of macro ‘SUBTARGET’
/rust-master/src/rustllvm/PassWrapper.cpp:134:9: note: in expansion of macro ‘SUBTARGET_MIPS’
         SUBTARGET_MIPS    \
         ^
/rust-master/src/rustllvm/PassWrapper.cpp:158:5: note: in expansion of macro ‘GEN_SUBTARGETS’
     GEN_SUBTARGETS {
     ^
/rust-master/src/rustllvm/PassWrapper.cpp:154:53: error: passing ‘const llvm::MCSubtargetInfo’ as ‘this’ argument of ‘bool llvm::MCSubtargetInfo::isCPUStringValid(llvm::StringRef)’ discards qualifiers [-fpermissive]
     if (MCInfo->isCPUStringValid(x##SubTypeKV[0].Key)) {    \
                                                     ^
/rust-master/src/rustllvm/PassWrapper.cpp:125:23: note: in expansion of macro ‘SUBTARGET’
 #define SUBTARGET_PPC SUBTARGET(PPC)
                       ^
/rust-master/src/rustllvm/PassWrapper.cpp:135:9: note: in expansion of macro ‘SUBTARGET_PPC’
         SUBTARGET_PPC
         ^
/rust-master/src/rustllvm/PassWrapper.cpp:158:5: note: in expansion of macro ‘GEN_SUBTARGETS’
     GEN_SUBTARGETS {
     ^
/rust-master/src/rustllvm/PassWrapper.cpp:166:13: error: ‘Bits’ was not declared in this scope
     return (Bits & FeatureEntry->Value) == FeatureEntry->Value;
             ^
/rust-master/src/rustllvm/PassWrapper.cpp:167:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [arm-unknown-linux-gnueabihf/rustllvm/PassWrapper.o] Error 1I remember some PR about feature detection that modified a few C++ files - looks like it might be related?
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.