[llvm-commits] [llvm-gcc-4.2] r64952 - /llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp

Bill Wendling isanbard at gmail.com
Wed Feb 18 13:45:48 PST 2009


Author: void
Date: Wed Feb 18 15:45:48 2009
New Revision: 64952

URL: http://llvm.org/viewvc/llvm-project?rev=64952&view=rev
Log:
--- Merging r64938 into '.':
U    gcc/llvm-debug.cpp

If FullPath is null, use main_input_filename. This avoids initializing a
std::string with null.

Modified:
    llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp

Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp?rev=64952&r1=64951&r2=64952&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp Wed Feb 18 15:45:48 2009
@@ -826,9 +826,10 @@
 /// getOrCreateCompileUnit - Get the compile unit from the cache or 
 /// create a new one if necessary.
 DICompileUnit DebugInfo::getOrCreateCompileUnit(const char *FullPath,
-                                                bool isMain){
-
-  GlobalVariable *&CU = CUCache[FullPath ? FullPath : main_input_filename];
+                                                bool isMain) {
+  if (!FullPath)
+    FullPath = main_input_filename;
+  GlobalVariable *&CU = CUCache[FullPath];
   if (CU)
     return DICompileUnit(CU);
 





More information about the llvm-commits mailing list