[llvm-branch-commits] [llvm-branch] r88698 - /llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Bill Wendling isanbard at gmail.com
Fri Nov 13 13:38:50 PST 2009


Author: void
Date: Fri Nov 13 15:38:50 2009
New Revision: 88698

URL: http://llvm.org/viewvc/llvm-project?rev=88698&view=rev
Log:
--- Merging r87064 into '.':
U    lib/CodeGen/AsmPrinter/DwarfDebug.cpp


Modified:
    llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=88698&r1=88697&r2=88698&view=diff

==============================================================================
--- llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Nov 13 15:38:50 2009
@@ -1349,10 +1349,12 @@
 
   if (Parent)
     Parent->AddScope(NScope);
-  else
-    // First function is top level function.
-    if (!FunctionDbgScope)
+  else {
+    DISubprogram SP(N);
+    if (!SP.isNull() &&
+        !strcmp(SP.getLinkageName(), MF->getFunction()->getNameStr().c_str()))
       FunctionDbgScope = NScope;
+  }
 
   DbgScopeMap.insert(std::make_pair(N, NScope));
   return NScope;
@@ -2053,18 +2055,16 @@
                                                MMI->getFrameMoves()));
 
   // Clear debug info
-  if (FunctionDbgScope) {
-    delete FunctionDbgScope;
-    DbgScopeMap.clear();
-    DbgScopeBeginMap.clear();
-    DbgScopeEndMap.clear();
-    DbgAbstractScopeMap.clear();
-    DbgConcreteScopeMap.clear();
-    FunctionDbgScope = NULL;
-    LexicalScopeStack.clear();
-    AbstractInstanceRootList.clear();
-    AbstractInstanceRootMap.clear();
-  }
+  delete FunctionDbgScope;
+  DbgScopeMap.clear();
+  DbgScopeBeginMap.clear();
+  DbgScopeEndMap.clear();
+  DbgAbstractScopeMap.clear();
+  DbgConcreteScopeMap.clear();
+  FunctionDbgScope = NULL;
+  LexicalScopeStack.clear();
+  AbstractInstanceRootList.clear();
+  AbstractInstanceRootMap.clear();
 
   Lines.clear();
 





More information about the llvm-branch-commits mailing list