[llvm-branch-commits] [llvm-gcc-branch] r86737 - /llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-debug.cpp

Bill Wendling isanbard at gmail.com
Tue Nov 10 14:34:22 PST 2009


Author: void
Date: Tue Nov 10 16:34:22 2009
New Revision: 86737

URL: http://llvm.org/viewvc/llvm-project?rev=86737&view=rev
Log:
$ svn merge -c 86734 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r86734 into '.':
U    gcc/llvm-debug.cpp


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

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

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-debug.cpp Tue Nov 10 16:34:22 2009
@@ -934,15 +934,22 @@
   // code generator accepts maximum one main compile unit per module. If a
   // module does not contain any main compile unit then the code generator 
   // will emit multiple compile units in the output object file.
-  getOrCreateCompileUnit(main_input_filename, true);
+  if (!strcmp (main_input_filename, ""))
+    getOrCreateCompileUnit("<stdin>", true);
+  else
+    getOrCreateCompileUnit(main_input_filename, true);
 }
 
 /// getOrCreateCompileUnit - Get the compile unit from the cache or 
 /// create a new one if necessary.
 DICompileUnit DebugInfo::getOrCreateCompileUnit(const char *FullPath,
                                                 bool isMain) {
-  if (!FullPath)
-    FullPath = main_input_filename;
+  if (!FullPath) {
+    if (!strcmp (main_input_filename, ""))
+      FullPath = "<stdin>";
+    else
+      FullPath = main_input_filename;
+  }
   std::map<std::string, WeakVH >::iterator I = CUCache.find(FullPath);
   if (I != CUCache.end())
     if (Value *M = I->second)





More information about the llvm-branch-commits mailing list