Clean up the definition of Str in AsmParser::ParseDirectiveDarwinDumpOrLoad

so it is defined with a lifetime that is as short as possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby
2009-07-16 17:17:46 +00:00
parent 014db9ddf7
commit 358ab1dbb0

View File

@ -1196,12 +1196,10 @@ bool AsmParser::ParseDirectiveInclude() {
/// ParseDirectiveDarwinDumpOrLoad /// ParseDirectiveDarwinDumpOrLoad
/// ::= ( .dump | .load ) "filename" /// ::= ( .dump | .load ) "filename"
bool AsmParser::ParseDirectiveDarwinDumpOrLoad(bool IsDump) { bool AsmParser::ParseDirectiveDarwinDumpOrLoad(bool IsDump) {
const char *Str;
if (Lexer.isNot(asmtok::String)) if (Lexer.isNot(asmtok::String))
return TokError("expected string in '.dump' or '.load' directive"); return TokError("expected string in '.dump' or '.load' directive");
Str = Lexer.getCurStrVal(); const char *Str = Lexer.getCurStrVal();
Lexer.Lex(); Lexer.Lex();