Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions llvm/tools/llvm-dis/llvm-dis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ static cl::opt<bool> PrintThinLTOIndexOnly(
cl::desc("Only read thinlto index and print the index as LLVM assembly."),
cl::init(false), cl::Hidden, cl::cat(DisCategory));

namespace {

static void printDebugLoc(const DebugLoc &DL, formatted_raw_ostream &OS) {
OS << DL.getLine() << ":" << DL.getCol();
if (DILocation *IDL = DL.getInlinedAt()) {
OS << "@";
printDebugLoc(IDL, OS);
}
}

namespace {
class CommentWriter : public AssemblyAnnotationWriter {
private:
bool canSafelyAccessUses(const Value &V) {
Expand All @@ -117,6 +117,7 @@ class CommentWriter : public AssemblyAnnotationWriter {
OS << "; [#uses=" << F->getNumUses() << ']'; // Output # uses
OS << '\n';
}

void printInfoComment(const Value &V, formatted_raw_ostream &OS) override {
if (!canSafelyAccessUses(V))
return;
Expand Down Expand Up @@ -165,7 +166,7 @@ struct LLVMDisDiagnosticHandler : public DiagnosticHandler {
return true;
}
};
} // end anon namespace
} // namespace

static ExitOnError ExitOnErr;

Expand Down