diff options
author | Manman Ren <mren@apple.com> | 2013-06-26 21:26:10 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-06-26 21:26:10 +0000 |
commit | 02e75021d80bb068d0178f1e4fdd0a4fb36b9811 (patch) | |
tree | 45cb19def5d0e092731132f85d43fbeed95e6abd | |
parent | 8b9962d514c1834c17254e53b169bf618079562c (diff) | |
download | llvm-02e75021d80bb068d0178f1e4fdd0a4fb36b9811.tar.gz llvm-02e75021d80bb068d0178f1e4fdd0a4fb36b9811.tar.bz2 llvm-02e75021d80bb068d0178f1e4fdd0a4fb36b9811.tar.xz |
Debug Info: clean up usage of Verify.
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185020 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 6 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index ff73931565..8ceddf3b8c 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -279,7 +279,7 @@ void NVPTXAsmPrinter::emitLineNumberAsDotLoc(const MachineInstr &MI) { const LLVMContext &ctx = MF->getFunction()->getContext(); DIScope Scope(curLoc.getScope(ctx)); - if (!Scope.Verify()) + if (!Scope.isScope()) return; StringRef fileName(Scope.getFilename()); diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index ef66bf8e11..fe3fe1c74a 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/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)); - if (!SP.Verify()) continue; + assert(SP.isSubprogram()); 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)); - if (!SP.Verify()) continue; + assert(SP.isSubprogram()); Function *F = SP.getFunction(); if (!F) continue; if (!Result) Result = true; diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 12e5b3e9d2..1878a54c9a 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/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.Verify()) + if (!DIVar.isVariable()) 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.Verify()) + if (!DIVar.isVariable()) 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.Verify()) + if (!DIVar.isVariable()) return false; // Create a copy of the original DIDescriptor for user variable, appending diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index f642a78fc0..11508de960 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -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)); - if (SP.Verify()) - getContextName(SP.getContext(), Name); + assert(SP.isSubprogram()); + getContextName(SP.getContext(), Name); Name = Name + SP.getDisplayName().str(); if (!Name.empty() && Processed.insert(Name)) { Out << Name << "\n"; |