Use the IDVal directly as there's no need to convert to std::string.
authorRoman Divacky <rdivacky@freebsd.org>
Thu, 28 Oct 2010 16:57:58 +0000 (16:57 +0000)
committerRoman Divacky <rdivacky@freebsd.org>
Thu, 28 Oct 2010 16:57:58 +0000 (16:57 +0000)
Pointed out by Chris!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117557 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmParser.cpp

index aa0f9f0ced9bbe48223b0161f66938d5ad565ee0..3243354c5ed3a736558e94955a6f09db89238feb 100644 (file)
@@ -1279,10 +1279,10 @@ bool AsmParser::ParseDirectiveSet(StringRef IDVal) {
   StringRef Name;
 
   if (ParseIdentifier(Name))
-    return TokError("expected identifier after '" + Twine(IDVal.str()) + "'");
+    return TokError("expected identifier after '" + Twine(IDVal) + "'");
 
   if (getLexer().isNot(AsmToken::Comma))
-    return TokError("unexpected token in '" + Twine(IDVal.str()) + "'");
+    return TokError("unexpected token in '" + Twine(IDVal) + "'");
   Lex();
 
   return ParseAssignment(Name);