Skip to content

Commit e550022

Browse files
authored
[RemoveDIs] Load into new debug info format by default in llvm-dis (#86276)
Directly load all bitcode into the new debug info format in llvm-dis. This means that new-mode bitcode no longer round-trips back to old-mode after parsing, and that old-mode bitcode gets auto-upgraded to new-mode debug info (which is the current in-memory default in LLVM).
1 parent 3cb0241 commit e550022

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/tools/llvm-dis/llvm-dis.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ static cl::opt<bool> PrintThinLTOIndexOnly(
8282

8383
extern cl::opt<bool> WriteNewDbgInfoFormat;
8484

85+
extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
86+
8587
namespace {
8688

8789
static void printDebugLoc(const DebugLoc &DL, formatted_raw_ostream &OS) {
@@ -169,6 +171,10 @@ int main(int argc, char **argv) {
169171
cl::HideUnrelatedOptions({&DisCategory, &getColorCategory()});
170172
cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .ll disassembler\n");
171173

174+
// Load bitcode into the new debug info format by default.
175+
if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
176+
LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
177+
172178
LLVMContext Context;
173179
Context.setDiagnosticHandler(
174180
std::make_unique<LLVMDisDiagnosticHandler>(argv[0]));

0 commit comments

Comments
 (0)