[PATCH] D124917: BitcodeReader: Avoid bad debug info warnings when stripping
Tim Renouf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 05:37:40 PDT 2022
tpr created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
tpr requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When loading old bitcode where the debug info would need upgrading, but
I am asking to strip debug info, it would give warnings about bad debug
info anyway. This commit stops it doing that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124917
Files:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -5665,7 +5665,10 @@
}
RemangledIntrinsics.clear();
- UpgradeDebugInfo(*TheModule);
+ if (StripDebugInfo)
+ llvm::StripDebugInfo(*TheModule);
+ else
+ UpgradeDebugInfo(*TheModule);
UpgradeModuleFlags(*TheModule);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124917.426972.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/bd9dd7e3/attachment.bin>
More information about the llvm-commits
mailing list