From 91f734b9ab07f0b13c6f1fbc4a6cbcd1dab69f44 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 31 Jan 2017 00:45:01 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293577 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/IntrinsicEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp index 0e4d1c7b8ae..eb30ddcb280 100644 --- a/utils/TableGen/IntrinsicEmitter.cpp +++ b/utils/TableGen/IntrinsicEmitter.cpp @@ -133,13 +133,13 @@ void IntrinsicEmitter::EmitTargetInfo(const CodeGenIntrinsicTable &Ints, 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"; -- 2.50.1