From 20f23a27dd82c7a205190d1dfed5dfaedc6da6ee Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 21 Apr 2017 12:51:43 +0000 Subject: [PATCH] [globalisel][tablegen] Try again to fix builds on old MSVC's after r300964 This should fix llvm-clang-x86_64-expensive-checks-win I reproduced the error using the following code: namespace llvm { // Moving this out of the llvm namespace fixes the error. template class PredicateBitsetImpl {}; } namespace { const unsigned MAX_SUBTARGET_PREDICATES = 11; // This works on Clang but is broken on MSVC // using PredicateBitset = PredicateBitsetImpl; // Some versions emit a syntax error here ("error C2061: syntax error: identifier // 'PredicateBitsetImpl'") but others accept it and only emit the C3646 below. // // This works on Clang and MSVC using PredicateBitset = llvm::PredicateBitsetImpl; class Foo { private: PredicateBitset A; // error C3646: 'A': unknown override specifier }; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300970 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/GlobalISelEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/TableGen/GlobalISelEmitter.cpp b/utils/TableGen/GlobalISelEmitter.cpp index 312b3a69c71..0c77167d4cc 100644 --- a/utils/TableGen/GlobalISelEmitter.cpp +++ b/utils/TableGen/GlobalISelEmitter.cpp @@ -1750,7 +1750,7 @@ void GlobalISelEmitter::run(raw_ostream &OS) { << "const unsigned MAX_SUBTARGET_PREDICATES = " << SubtargetFeatures.size() << ";\n" << "using PredicateBitset = " - "PredicateBitsetImpl;\n" + "llvm::PredicateBitsetImpl;\n" << "#endif // ifdef GET_GLOBALISEL_PREDICATE_BITSET\n\n"; OS << "#ifdef GET_GLOBALISEL_TEMPORARIES_DECL\n"; -- 2.11.0