Skip to content

Commit

Permalink
[RemoveDIs] Load into new debug info format by default in llvm-link (#…
Browse files Browse the repository at this point in the history
…86274)

Directly load all bitcode into the new debug info format in llvm-link.
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).
  • Loading branch information
OCHyams committed Mar 25, 2024
1 parent 2ef6120 commit 8263a88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/tools/llvm-link/llvm-link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ static cl::opt<bool> TryUseNewDbgInfoFormat(

extern cl::opt<bool> UseNewDbgInfoFormat;

extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;

static ExitOnError ExitOnErr;

// Read the specified bitcode file in and return it. This routine searches the
Expand Down Expand Up @@ -480,6 +482,10 @@ int main(int argc, char **argv) {
cl::HideUnrelatedOptions({&LinkCategory, &getColorCategory()});
cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");

// Load bitcode into the new debug info format by default.
if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;

// RemoveDIs debug-info transition: tests may request that we /try/ to use the
// new debug-info format.
if (TryUseNewDbgInfoFormat) {
Expand Down

0 comments on commit 8263a88

Please sign in to comment.