Skip to content

Commit 3f1723a

Browse files
OCHyamsronlieb
authored andcommitted
[RemoveDIs] Add flag to control loading into new debug mode from bitcode (llvm#85649)
--load-bitcode-into-experimental-debuginfo-iterators false: Convert to the old debug mode after reading. true: Upgrade to the new debug info format (*). unset: Same as false (for now). (*) As of this patch it actually just means "don't convert to either mode after loading". Auto-upgrading will be implemented in an upcoming patch. With this flag we can incrementally add support for RemoveDIs by overriding the "unset" behaviour in individual tools. The flag can be removed once all tools support the new debug info mode. Change-Id: I81f7fb83ac95223497d5577354bff7a76b2edb3e
1 parent 00efb47 commit 3f1723a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4302,9 +4302,11 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
43024302
Error BitcodeReader::parseModule(uint64_t ResumeBit,
43034303
bool ShouldLazyLoadMetadata,
43044304
ParserCallbacks Callbacks) {
4305-
// Force the debug-info mode into the old format for now.
4306-
// FIXME: Remove this once all tools support RemoveDIs.
4307-
TheModule->IsNewDbgInfoFormat = false;
4305+
// Load directly into RemoveDIs format if LoadBitcodeIntoNewDbgInforFormat
4306+
// has been set to true (default action: load into the old debug format).
4307+
TheModule->IsNewDbgInfoFormat =
4308+
UseNewDbgInfoFormat &&
4309+
LoadBitcodeIntoNewDbgInforFormat == cl::boolOrDefault::BOU_TRUE;
43084310

43094311
this->ValueTypeCallback = std::move(Callbacks.ValueType);
43104312
if (ResumeBit) {

0 commit comments

Comments
 (0)