[llvm-commits] [llvm] r78335 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp

Devang Patel dpatel at apple.com
Thu Aug 6 13:57:44 PDT 2009


Author: dpatel
Date: Thu Aug  6 15:57:44 2009
New Revision: 78335

URL: http://llvm.org/viewvc/llvm-project?rev=78335&view=rev
Log:
Remove dead code.

Modified:
    llvm/trunk/include/llvm/Analysis/DebugInfo.h
    llvm/trunk/lib/Analysis/DebugInfo.cpp

Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=78335&r1=78334&r2=78335&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Thu Aug  6 15:57:44 2009
@@ -563,12 +563,6 @@
                        std::string &Type, unsigned &LineNo, std::string &File,
                        std::string &Dir); 
 
-  /// CollectDebugInfoAnchors - Collect debugging information anchors.
-  void CollectDebugInfoAnchors(Module &M,
-                               SmallVector<GlobalVariable *, 2> &CompileUnits,
-                               SmallVector<GlobalVariable *, 4> &GlobalVars,
-                               SmallVector<GlobalVariable *, 4> &Subprograms);
-
   /// isValidDebugInfoIntrinsic - Return true if SPI is a valid debug 
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgStopPointInst &SPI, 

Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=78335&r1=78334&r2=78335&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Thu Aug  6 15:57:44 2009
@@ -528,7 +528,7 @@
   // If we already have this array, just return the uniqued version.
   DIDescriptor &Entry = SimpleConstantCache[Init];
   if (!Entry.isNull()) return DIArray(Entry.getGV());
-  
+
   GlobalVariable *GV = new GlobalVariable(M, Init->getType(), true,
                                           GlobalValue::InternalLinkage,
                                           Init, "llvm.dbg.array");
@@ -1197,36 +1197,6 @@
     return true;
   }
 
-  /// CollectDebugInfoAnchors - Collect debugging information anchors.
-  void CollectDebugInfoAnchors(Module &M,
-                               SmallVector<GlobalVariable *, 2> &CUs,
-                               SmallVector<GlobalVariable *, 4> &GVs,
-                               SmallVector<GlobalVariable *, 4> &SPs) {
-
-    for (Module::global_iterator GVI = M.global_begin(), E = M.global_end();
-       GVI != E; GVI++) {
-      GlobalVariable *GV = GVI;
-      if (GV->hasName() && GV->getName().startswith("llvm.dbg")
-          && GV->isConstant() && GV->hasInitializer()) {
-        DICompileUnit C(GV);
-        if (C.isNull() == false) {
-          CUs.push_back(GV);
-          continue;
-        }
-        DIGlobalVariable G(GV);
-        if (G.isNull() == false) {
-          GVs.push_back(GV);
-          continue;
-        }
-        DISubprogram S(GV);
-        if (S.isNull() == false) {
-          SPs.push_back(GV);
-          continue;
-        }
-      }
-    }
-  }
-
   /// isValidDebugInfoIntrinsic - Return true if SPI is a valid debug 
   /// info intrinsic.
   bool isValidDebugInfoIntrinsic(DbgStopPointInst &SPI, 





More information about the llvm-commits mailing list