diff options
author | Kevin Enderby <enderby@apple.com> | 2009-07-16 17:17:46 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2009-07-16 17:17:46 +0000 |
commit | 358ab1dbb016c50528ada714fa400c821438f2ee (patch) | |
tree | 970102daa34cadbdedea09e3315f6a59ed79b1aa | |
parent | 014db9ddf7782457fd761d90c4a6ba100ff24a43 (diff) |
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
-rw-r--r-- | tools/llvm-mc/AsmParser.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index 68eb9d56c0..5a6db1c9c0 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(); |