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
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index 68eb9d5..5a6db1c 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/tools/llvm-mc/AsmParser.cpp
@@ -1196,12 +1196,10 @@
 /// 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();