summaryrefslogtreecommitdiff
path: root/lib/Analysis/DbgInfoPrinter.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-01-05 01:10:40 +0000
committerDevang Patel <dpatel@apple.com>2010-01-05 01:10:40 +0000
commit44a29e066a24e88bdf127e88be4380a5f259c4b4 (patch)
tree26820d0116232725e3de4f9627ad255006c1d8a2 /lib/Analysis/DbgInfoPrinter.cpp
parent4361bbfd0e41453224a1867d2c4d04ef7b3d723b (diff)
downloadllvm-44a29e066a24e88bdf127e88be4380a5f259c4b4.tar.gz
llvm-44a29e066a24e88bdf127e88be4380a5f259c4b4.tar.bz2
llvm-44a29e066a24e88bdf127e88be4380a5f259c4b4.tar.xz
Remove dead debug info intrinsics.
Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start AutoUpgrade simply ignores these intrinsics now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DbgInfoPrinter.cpp')
-rw-r--r--lib/Analysis/DbgInfoPrinter.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/lib/Analysis/DbgInfoPrinter.cpp b/lib/Analysis/DbgInfoPrinter.cpp
index 7d72b383a5..3532b052dc 100644
--- a/lib/Analysis/DbgInfoPrinter.cpp
+++ b/lib/Analysis/DbgInfoPrinter.cpp
@@ -37,8 +37,6 @@ PrintDirectory("print-fullpath",
namespace {
class PrintDbgInfo : public FunctionPass {
raw_ostream &Out;
- void printStopPoint(const DbgStopPointInst *DSI);
- void printFuncStart(const DbgFuncStartInst *FS);
void printVariableDeclaration(const Value *V);
public:
static char ID; // Pass identification
@@ -74,27 +72,6 @@ void PrintDbgInfo::printVariableDeclaration(const Value *V) {
Out << File << ":" << LineNo << "\n";
}
-void PrintDbgInfo::printStopPoint(const DbgStopPointInst *DSI) {
- if (PrintDirectory)
- if (MDString *Str = dyn_cast<MDString>(DSI->getDirectory()))
- Out << Str->getString() << '/';
-
- if (MDString *Str = dyn_cast<MDString>(DSI->getFileName()))
- Out << Str->getString();
- Out << ':' << DSI->getLine();
-
- if (unsigned Col = DSI->getColumn())
- Out << ':' << Col;
-}
-
-void PrintDbgInfo::printFuncStart(const DbgFuncStartInst *FS) {
- DISubprogram Subprogram(FS->getSubprogram());
- Out << "; fully qualified function name: " << Subprogram.getDisplayName()
- << " return type: " << Subprogram.getReturnTypeName()
- << " at line " << Subprogram.getLineNumber()
- << "\n\n";
-}
-
bool PrintDbgInfo::runOnFunction(Function &F) {
if (F.isDeclaration())
return false;
@@ -108,57 +85,21 @@ bool PrintDbgInfo::runOnFunction(Function &F) {
// Skip dead blocks.
continue;
- const DbgStopPointInst *DSI = findBBStopPoint(BB);
Out << BB->getName();
Out << ":";
- if (DSI) {
- Out << "; (";
- printStopPoint(DSI);
- Out << ")";
- }
-
Out << "\n";
- // A dbgstoppoint's information is valid until we encounter a new one.
- const DbgStopPointInst *LastDSP = DSI;
- bool Printed = DSI != 0;
for (BasicBlock::const_iterator i = BB->begin(), e = BB->end();
i != e; ++i) {
- if (isa<DbgInfoIntrinsic>(i)) {
- if ((DSI = dyn_cast<DbgStopPointInst>(i))) {
- if (DSI->getContext() == LastDSP->getContext() &&
- DSI->getLineValue() == LastDSP->getLineValue() &&
- DSI->getColumnValue() == LastDSP->getColumnValue())
- // Don't print same location twice.
- continue;
-
- LastDSP = cast<DbgStopPointInst>(i);
-
- // Don't print consecutive stoppoints, use a flag to know which one we
- // printed.
- Printed = false;
- } else if (const DbgFuncStartInst *FS = dyn_cast<DbgFuncStartInst>(i)) {
- printFuncStart(FS);
- }
- } else {
- if (!Printed && LastDSP) {
- Out << "; ";
- printStopPoint(LastDSP);
- Out << "\n";
- Printed = true;
- }
- Out << *i << '\n';
printVariableDeclaration(i);
if (const User *U = dyn_cast<User>(i)) {
for(unsigned i=0;i<U->getNumOperands();i++)
printVariableDeclaration(U->getOperand(i));
}
- }
}
}
-
return false;
}