[Lldb-commits] [lldb] r181027 - Fixed 'command script import' by eliminating the shadowing of basename.

Ashok Thirumurthi ashok.thirumurthi at intel.com
Fri May 3 08:57:00 PDT 2013


Author: athirumu
Date: Fri May  3 10:56:59 2013
New Revision: 181027

URL: http://llvm.org/viewvc/llvm-project?rev=181027&view=rev
Log:
Fixed 'command script import' by eliminating the shadowing of basename.

Reviewed by: Daniel Malea

Modified:
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=181027&r1=181026&r2=181027&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Fri May  3 10:56:59 2013
@@ -2593,8 +2593,8 @@ ScriptInterpreterPython::LoadScriptingMo
 
     {
         FileSpec target_file(pathname, true);
+        std::string basename(target_file.GetFilename().GetCString());
         
-        std::string basename;
         StreamString command_stream;
 
         // Before executing Pyton code, lock the GIL.
@@ -2612,7 +2612,6 @@ ScriptInterpreterPython::LoadScriptingMo
         else
         {
             const char* directory = target_file.GetDirectory().GetCString();
-            std::string basename(target_file.GetFilename().GetCString());
             
             // now make sure that Python has "directory" in the search path
             StreamString command_stream;





More information about the lldb-commits mailing list