[PATCH] D17338: [SplitModule] Do not copy stale debug info during module splitting.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 09:58:22 PST 2016
joker.eph added a subscriber: joker.eph.
joker.eph added a comment.
Sorry for the delay, I'm not a debug info expert, so I won't be able to catch all corner cases, maybe D.Blakie or A.Prantl can help?
On the approach itself, it seems like a band-aid compared to filtering out what should be imported in the first place. Maybe Teresa who worked on the filtering has some input (or better: some refactored code to share?).
================
Comment at: lib/Transforms/Utils/SplitModule.cpp:223
@@ +222,3 @@
+static void StripDeadDebugInfo(Module &M) {
+ DebugInfoFinder F;
+ F.processModule(M);
----------------
Nit: `F` is used elsewhere for `Function`, rename?
================
Comment at: lib/Transforms/Utils/SplitModule.cpp:258
@@ +257,3 @@
+ // global variable that ended up in another partition will be a
+ // declaration.
+ if (DIG->getVariable()) {
----------------
Not sure if it is the right thing to do, but I'm gonna leave this to people more aware of debug info than I am.
http://reviews.llvm.org/D17338
More information about the llvm-commits
mailing list