From 358ab1dbb016c50528ada714fa400c821438f2ee Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Thu, 16 Jul 2009 17:17:46 +0000 Subject: [PATCH] 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 --- tools/llvm-mc/AsmParser.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index 68eb9d56c07..5a6db1c9c02 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/tools/llvm-mc/AsmParser.cpp @@ -1196,12 +1196,10 @@ bool AsmParser::ParseDirectiveInclude() { /// 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();