[llvm-commits] [llvm] r76082 - /llvm/trunk/tools/llvm-mc/AsmParser.cpp
Kevin Enderby
enderby at apple.com
Thu Jul 16 10:17:56 PDT 2009
Author: enderby
Date: Thu Jul 16 12:17:46 2009
New Revision: 76082
URL: http://llvm.org/viewvc/llvm-project?rev=76082&view=rev
Log:
Clean up the definition of Str in AsmParser::ParseDirectiveDarwinDumpOrLoad
so it is defined with a lifetime that is as short as possible.
Modified:
llvm/trunk/tools/llvm-mc/AsmParser.cpp
Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=76082&r1=76081&r2=76082&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Thu Jul 16 12:17:46 2009
@@ -1196,12 +1196,10 @@
/// ParseDirectiveDarwinDumpOrLoad
/// ::= ( .dump | .load ) "filename"
bool AsmParser::ParseDirectiveDarwinDumpOrLoad(bool IsDump) {
- const char *Str;
-
if (Lexer.isNot(asmtok::String))
return TokError("expected string in '.dump' or '.load' directive");
- Str = Lexer.getCurStrVal();
+ const char *Str = Lexer.getCurStrVal();
Lexer.Lex();
More information about the llvm-commits
mailing list