From 27b83d4ff2264d9a0e2367d92543efe4c0148931 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 1 Apr 2011 20:23:52 +0000 Subject: tlbgen/MC: StringRef's to temporary objects considered harmful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128735 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmMatcherEmitter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/TableGen') diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index e3def41..369ec90 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -1483,10 +1483,10 @@ static void EmitConvertToMCInst(CodeGenTarget &Target, StringRef ClassName, MatchableInfo &II = **it; // Check if we have a custom match function. - StringRef AsmMatchConverter = II.getResultInst()->TheDef->getValueAsString( - "AsmMatchConverter"); + std::string AsmMatchConverter = + II.getResultInst()->TheDef->getValueAsString("AsmMatchConverter"); if (!AsmMatchConverter.empty()) { - std::string Signature = "ConvertCustom_" + AsmMatchConverter.str(); + std::string Signature = "ConvertCustom_" + AsmMatchConverter; II.ConversionFnKind = Signature; // Check if we have already generated this signature. -- cgit v1.1