[llvm] r293577 - TableGen: use fully qualified name for StringLiteral
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 16:45:02 PST 2017
Author: compnerd
Date: Mon Jan 30 18:45:01 2017
New Revision: 293577
URL: http://llvm.org/viewvc/llvm-project?rev=293577&view=rev
Log:
TableGen: use fully qualified name for StringLiteral
Use the qualified name for StringLiteral (llvm::StringLiteral) when
generating the sources. This is needed as the generated files may be
used out-of-tree (e.g. swift) where you may not have a
`using namespace llvm;` resulting in an undefined lookup.
Modified:
llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=293577&r1=293576&r2=293577&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Mon Jan 30 18:45:01 2017
@@ -133,13 +133,13 @@ void IntrinsicEmitter::EmitTargetInfo(co
OS << "// Target mapping\n";
OS << "#ifdef GET_INTRINSIC_TARGET_DATA\n";
OS << "struct IntrinsicTargetInfo {\n"
- << " StringLiteral Name;\n"
+ << " llvm::StringLiteral Name;\n"
<< " size_t Offset;\n"
<< " size_t Count;\n"
<< "};\n";
OS << "static constexpr IntrinsicTargetInfo TargetInfos[] = {\n";
for (auto Target : Ints.Targets)
- OS << " {StringLiteral(\"" << Target.Name << "\"), " << Target.Offset
+ OS << " {llvm::StringLiteral(\"" << Target.Name << "\"), " << Target.Offset
<< ", " << Target.Count << "},\n";
OS << "};\n";
OS << "#endif\n\n";
More information about the llvm-commits
mailing list