[PATCH] D42971: [ThinLTO] - Simplify code in ThinLTOBitcodeWriter.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 08:35:16 PST 2018
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM with the below changes. Thanks for the cleanup!
================
Comment at: lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:174
+static void filterModule(Module *M,
+ function_ref<bool(const GlobalValue *)> ShouldKeep) {
+ auto I = M->global_values().begin();
----------------
Recommend keeping the old callback name - it still fits the behavior and reduces unnecessary churn.
================
Comment at: lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:178
+ while (I != E) {
+ GlobalValue &GA = *I++;
+ if (ShouldKeep(&GA))
----------------
s/GA/GV/ since to match the data type.
https://reviews.llvm.org/D42971
More information about the llvm-commits
mailing list