]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
Revert "Debug Info: clean up usage of Verify." as it's breaking bots.
authorEric Christopher <echristo@gmail.com>
Wed, 26 Jun 2013 22:44:57 +0000 (22:44 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 26 Jun 2013 22:44:57 +0000 (22:44 +0000)
This reverts commit r185020

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185032 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Utils/Local.cpp
tools/opt/opt.cpp

index 8ceddf3b8c813039c27165fd6eae55532a46792a..ff739315657d98e9c23f639db92563fe95023915 100644 (file)
@@ -279,7 +279,7 @@ void NVPTXAsmPrinter::emitLineNumberAsDotLoc(const MachineInstr &MI) {
   const LLVMContext &ctx = MF->getFunction()->getContext();
   DIScope Scope(curLoc.getScope(ctx));
 
-  if (!Scope.isScope())
+  if (!Scope.Verify())
     return;
 
   StringRef fileName(Scope.getFilename());
index fe3fe1c74a040f92d73386ec146cfa1ff7db066d..ef66bf8e11ca04b05dedb66922ce968a434b3ce7 100644 (file)
@@ -434,7 +434,7 @@ void GCOVProfiler::emitProfileNotes() {
     DIArray SPs = CU.getSubprograms();
     for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
       DISubprogram SP(SPs.getElement(i));
-      assert(SP.isSubprogram());
+      if (!SP.Verify()) continue;
 
       Function *F = SP.getFunction();
       if (!F) continue;
@@ -483,7 +483,7 @@ bool GCOVProfiler::emitProfileArcs() {
     SmallVector<std::pair<GlobalVariable *, MDNode *>, 8> CountersBySP;
     for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
       DISubprogram SP(SPs.getElement(i));
-      assert(SP.isSubprogram());
+      if (!SP.Verify()) continue;
       Function *F = SP.getFunction();
       if (!F) continue;
       if (!Result) Result = true;
index 1878a54c9acc65f2f91af724018f3f61ebe4e020..12e5b3e9d2e0aa261991e20272e028787c38bac5 100644 (file)
@@ -854,7 +854,7 @@ static bool LdStHasDebugValue(DIVariable &DIVar, Instruction *I) {
 bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
                                            StoreInst *SI, DIBuilder &Builder) {
   DIVariable DIVar(DDI->getVariable());
-  if (!DIVar.isVariable())
+  if (!DIVar.Verify())
     return false;
 
   if (LdStHasDebugValue(DIVar, SI))
@@ -888,7 +888,7 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
 bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
                                            LoadInst *LI, DIBuilder &Builder) {
   DIVariable DIVar(DDI->getVariable());
-  if (!DIVar.isVariable())
+  if (!DIVar.Verify())
     return false;
 
   if (LdStHasDebugValue(DIVar, LI))
@@ -961,7 +961,7 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
   if (!DDI)
     return false;
   DIVariable DIVar(DDI->getVariable());
-  if (!DIVar.isVariable())
+  if (!DIVar.Verify())
     return false;
 
   // Create a copy of the original DIDescriptor for user variable, appending
index 11508de9601804db5431348dd41c5aeed2ced104..f642a78fc06f190efcb4b901ac17d1cfc80db2b3 100644 (file)
@@ -389,8 +389,8 @@ struct BreakpointPrinter : public ModulePass {
       for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
         std::string Name;
         DISubprogram SP(NMD->getOperand(i));
-        assert(SP.isSubprogram());
-        getContextName(SP.getContext(), Name);
+        if (SP.Verify())
+          getContextName(SP.getContext(), Name);
         Name = Name + SP.getDisplayName().str();
         if (!Name.empty() && Processed.insert(Name)) {
           Out << Name << "\n";