forked from OSchip/llvm-project
parent
3ceac21d37
commit
4db3844e8b
|
|
@ -97,6 +97,8 @@ namespace llvm {
|
|||
return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx;
|
||||
}
|
||||
bool operator!=(const DebugLoc &DL) const { return !(*this == DL); }
|
||||
|
||||
void dump(const LLVMContext &Ctx) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
|
|||
|
|
@ -144,6 +144,22 @@ DebugLoc DebugLoc::getFromDILexicalBlock(MDNode *N) {
|
|||
return get(LineNo, ColNo, Scope, NULL);
|
||||
}
|
||||
|
||||
void DebugLoc::dump(const LLVMContext &Ctx) const {
|
||||
#ifndef NDEBUG
|
||||
if (!isUnknown()) {
|
||||
dbgs() << getLine();
|
||||
if (getCol() != 0)
|
||||
dbgs() << ',' << getCol();
|
||||
DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(getInlinedAt(Ctx));
|
||||
if (!InlinedAtDL.isUnknown()) {
|
||||
dbgs() << " @ ";
|
||||
InlinedAtDL.dump(Ctx);
|
||||
} else
|
||||
dbgs() << "\n";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DenseMap specialization
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
|||
Loading…
Reference in New Issue