Skip to content

Commit 8263a88

Browse files
authored
[RemoveDIs] Load into new debug info format by default in llvm-link (#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).
1 parent 2ef6120 commit 8263a88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/tools/llvm-link/llvm-link.cpp

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

137137
extern cl::opt<bool> UseNewDbgInfoFormat;
138138

139+
extern cl::opt<cl::boolOrDefault> LoadBitcodeIntoNewDbgInfoFormat;
140+
139141
static ExitOnError ExitOnErr;
140142

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

485+
// Load bitcode into the new debug info format by default.
486+
if (LoadBitcodeIntoNewDbgInfoFormat == cl::boolOrDefault::BOU_UNSET)
487+
LoadBitcodeIntoNewDbgInfoFormat = cl::boolOrDefault::BOU_TRUE;
488+
483489
// RemoveDIs debug-info transition: tests may request that we /try/ to use the
484490
// new debug-info format.
485491
if (TryUseNewDbgInfoFormat) {

0 commit comments

Comments
 (0)