aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-25 10:25:35 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-25 10:25:35 -0700
commit8811efb18b978645cf5ef8a88a9b57066c21ff1f (patch)
tree3dd9198f7416d868a453e65c24a54709c5f58f97 /lib/Transforms
parentd32f2f27e9bed303ce454ec48608204fba1e1194 (diff)
PNaCl: Fix removal of dead function prototypes in ABI simplification
The use of StripDeadPrototypes in PNaClABISimplify.cpp wasn't always having an effect: it doesn't work if there are dead constant references remaining to a function declaration. ReplacePtrsWithInts was leaving some of these references behind, so fix it. BUG=none TEST=llvm-lit tests Review URL: https://codereview.chromium.org/17636006
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/NaCl/ReplacePtrsWithInts.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp b/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
index 6e8c6915e5..cee574296f 100644
--- a/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
+++ b/lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
@@ -610,6 +610,9 @@ bool ReplacePtrsWithInts::runOnModule(Module &M) {
// various casts.
for (Module::iterator Func = M.begin(), E = M.end(); Func != E; ++Func) {
CleanUpFunction(Func, IntPtrType);
+ // Delete the now-unused bitcast ConstantExprs that we created so
+ // that they don't interfere with StripDeadPrototypes.
+ Func->removeDeadConstantUsers();
}
return true;
}