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 | 7bef8bc3202c8d248fe500b37849474951c554b4 (patch) | |
tree | a260cc7ca67cec64e03cbb6546923bd9ebfbcd57 /llvm/tools/llvm-mc/AsmParser.cpp | |
parent | e5df197e7067561562d6d4d5be52c91121154883 (diff) | |
download | bcm5719-llvm-7bef8bc3202c8d248fe500b37849474951c554b4.tar.gz bcm5719-llvm-7bef8bc3202c8d248fe500b37849474951c554b4.zip |
Clean up the definition of Str in AsmParser::ParseDirectiveDarwinDumpOrLoad
so it is defined with a lifetime that is as short as possible.
llvm-svn: 76082
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
-rw-r--r-- | llvm/tools/llvm-mc/AsmParser.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp index 68eb9d56c07..5a6db1c9c02 100644 --- a/llvm/tools/llvm-mc/AsmParser.cpp +++ b/llvm/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(); |