diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-03-23 18:06:46 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-03-23 18:06:46 +0000 |
commit | 43970fec322d9e0153ca513de41d80af1c79bdde (patch) | |
tree | cc69019964f4248747b2d86cdf64b984ce8463ca /lib/Debugger/ProgramInfo.cpp | |
parent | 4556ce5d115f93ad6809d77810b9b770e5f737f2 (diff) |
Handle new forms of llvm.dbg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Debugger/ProgramInfo.cpp')
-rw-r--r-- | lib/Debugger/ProgramInfo.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Debugger/ProgramInfo.cpp b/lib/Debugger/ProgramInfo.cpp index 9ed0db2f12..3bbb0ec936 100644 --- a/lib/Debugger/ProgramInfo.cpp +++ b/lib/Debugger/ProgramInfo.cpp @@ -16,6 +16,7 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Intrinsics.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Debugger/SourceFile.h" @@ -57,17 +58,15 @@ static const GlobalVariable *getNextStopPoint(const Value *V, unsigned &LineNo, // Infinite loops == bad, ignore PHI nodes. ShouldRecurse = false; } else if (const CallInst *CI = dyn_cast<CallInst>(*UI)) { + // If we found a stop point, check to see if it is earlier than what we // already have. If so, remember it. if (const Function *F = CI->getCalledFunction()) - if (F->getIntrinsicID() == Intrinsic::dbg_stoppoint) { - unsigned CurLineNo = ~0, CurColNo = ~0; + if (const DbgStopPointInst *SPI = dyn_cast<DbgStopPointInst>(CI)) { + unsigned CurLineNo = SPI->getLine(); + unsigned CurColNo = SPI->getColumn(); const GlobalVariable *CurDesc = 0; - if (const ConstantInt *C = dyn_cast<ConstantInt>(CI->getOperand(1))) - CurLineNo = C->getRawValue(); - if (const ConstantInt *C = dyn_cast<ConstantInt>(CI->getOperand(2))) - CurColNo = C->getRawValue(); - const Value *Op = CI->getOperand(3); + const Value *Op = SPI->getContext(); if ((CurDesc = dyn_cast<GlobalVariable>(Op)) && (LineNo < LastLineNo || @@ -78,7 +77,6 @@ static const GlobalVariable *getNextStopPoint(const Value *V, unsigned &LineNo, } ShouldRecurse = false; } - } // If this is not a phi node or a stopping point, recursively scan the users |