[llvm] r185032 - Revert "Debug Info: clean up usage of Verify." as it's breaking bots.
Eric Christopher
echristo at gmail.com
Wed Jun 26 15:44:57 PDT 2013
Author: echristo
Date: Wed Jun 26 17:44:57 2013
New Revision: 185032
URL: http://llvm.org/viewvc/llvm-project?rev=185032&view=rev
Log:
Revert "Debug Info: clean up usage of Verify." as it's breaking bots.
This reverts commit r185020
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
llvm/trunk/lib/Transforms/Utils/Local.cpp
llvm/trunk/tools/opt/opt.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp?rev=185032&r1=185031&r2=185032&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp Wed Jun 26 17:44:57 2013
@@ -279,7 +279,7 @@ void NVPTXAsmPrinter::emitLineNumberAsDo
const LLVMContext &ctx = MF->getFunction()->getContext();
DIScope Scope(curLoc.getScope(ctx));
- if (!Scope.isScope())
+ if (!Scope.Verify())
return;
StringRef fileName(Scope.getFilename());
Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=185032&r1=185031&r2=185032&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Wed Jun 26 17:44:57 2013
@@ -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;
Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=185032&r1=185031&r2=185032&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Wed Jun 26 17:44:57 2013
@@ -854,7 +854,7 @@ static bool LdStHasDebugValue(DIVariable
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::ConvertDebugDeclareToDebugVal
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(Al
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
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=185032&r1=185031&r2=185032&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Wed Jun 26 17:44:57 2013
@@ -389,8 +389,8 @@ struct BreakpointPrinter : public Module
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";
More information about the llvm-commits
mailing list