void SelectionDAGBuilder::resolveDanglingDebugInfo(const Value *V,
SDValue Val) {
DanglingDebugInfo &DDI = DanglingDebugInfoMap[V];
- MDNode *Variable = NULL;
- uint64_t Offset = 0;
-
- if (const DbgValueInst *DI = dyn_cast_or_null<DbgValueInst>(DDI.getDI())) {
- Variable = DI->getVariable();
- Offset = DI->getOffset();
- } else if (const DbgDeclareInst *DI =
- dyn_cast_or_null<DbgDeclareInst>(DDI.getDI()))
- Variable = DI->getVariable();
- else {
- assert (DDI.getDI() == NULL && "Invalid debug info intrinsic!");
- return;
- }
-
- if (Variable) {
+ if (DDI.getDI()) {
+ const DbgValueInst *DI = DDI.getDI();
DebugLoc dl = DDI.getdl();
unsigned DbgSDNodeOrder = DDI.getSDNodeOrder();
+ MDNode *Variable = DI->getVariable();
+ uint64_t Offset = DI->getOffset();
SDDbgValue *SDV;
if (Val.getNode()) {
if (!EmitFuncArgumentDbgValue(V, Variable, Offset, Val)) {
class BitCastInst;
class BranchInst;
class CallInst;
-class DbgInfoIntrinsic;
+class DbgValueInst;
class ExtractElementInst;
class ExtractValueInst;
class FCmpInst;
/// DanglingDebugInfo - Helper type for DanglingDebugInfoMap.
class DanglingDebugInfo {
- const DbgInfoIntrinsic* DI;
+ const DbgValueInst* DI;
DebugLoc dl;
unsigned SDNodeOrder;
public:
DanglingDebugInfo() : DI(0), dl(DebugLoc()), SDNodeOrder(0) { }
- DanglingDebugInfo(const DbgInfoIntrinsic *di, DebugLoc DL, unsigned SDNO) :
+ DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO) :
DI(di), dl(DL), SDNodeOrder(SDNO) { }
- const DbgInfoIntrinsic* getDI() { return DI; }
+ const DbgValueInst* getDI() { return DI; }
DebugLoc getdl() { return dl; }
unsigned getSDNodeOrder() { return SDNodeOrder; }
};