summaryrefslogtreecommitdiff
path: root/tools/llvm-mc
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2009-07-16 17:17:46 +0000
committerKevin Enderby <enderby@apple.com>2009-07-16 17:17:46 +0000
commit358ab1dbb016c50528ada714fa400c821438f2ee (patch)
tree970102daa34cadbdedea09e3315f6a59ed79b1aa /tools/llvm-mc
parent014db9ddf7782457fd761d90c4a6ba100ff24a43 (diff)
downloadllvm-358ab1dbb016c50528ada714fa400c821438f2ee.tar.gz
llvm-358ab1dbb016c50528ada714fa400c821438f2ee.tar.bz2
llvm-358ab1dbb016c50528ada714fa400c821438f2ee.tar.xz
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
Diffstat (limited to 'tools/llvm-mc')
-rw-r--r--tools/llvm-mc/AsmParser.cpp4
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();