llvm.org GIT mirror llvm / 68338f8
llvm-dis: Use the new `DebugLoc` API, NFC Update tools/llvm-dis to use the new `DebugLoc` API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233590 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
1 changed file(s) with 4 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
5757
5858 static void printDebugLoc(const DebugLoc &DL, formatted_raw_ostream &OS) {
5959 OS << DL.getLine() << ":" << DL.getCol();
60 if (MDNode *N = DL.getInlinedAt(getGlobalContext())) {
61 DebugLoc IDL = DebugLoc::getFromDILocation(N);
62 if (!IDL.isUnknown()) {
63 OS << "@";
64 printDebugLoc(IDL,OS);
65 }
60 if (MDLocation *IDL = DL.getInlinedAt()) {
61 OS << "@";
62 printDebugLoc(IDL, OS);
6663 }
6764 }
6865 class CommentWriter : public AssemblyAnnotationWriter {
8077 OS << "; [#uses=" << V.getNumUses() << " type=" << *V.getType() << "]"; // Output # uses and type
8178 }
8279 if (const Instruction *I = dyn_cast(&V)) {
83 const DebugLoc &DL = I->getDebugLoc();
84 if (!DL.isUnknown()) {
80 if (const DebugLoc &DL = I->getDebugLoc()) {
8581 if (!Padded) {
8682 OS.PadToColumn(50);
8783 Padded = true;