diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index fe3fe1c74a0..ef66bf8e11c 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -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; diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 1878a54c9ac..12e5b3e9d2e 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -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 |