aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/NaCl/PNaClABISimplify.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index 9d7713139a..37504517d6 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -57,9 +57,12 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) {
PM.add(createFlattenGlobalsPass());
// We should not place arbitrary passes after ExpandConstantExpr
- // because they might reintroduce ConstantExprs. However,
+ // because they might reintroduce ConstantExprs.
+ PM.add(createExpandConstantExprPass());
// ExpandGetElementPtr must follow ExpandConstantExpr to expand the
// getelementptr instructions it creates.
- PM.add(createExpandConstantExprPass());
PM.add(createExpandGetElementPtrPass());
+ // ReplacePtrsWithInts assumes that getelementptr instructions and
+ // ConstantExprs have already been expanded out.
+ PM.add(createReplacePtrsWithIntsPass());
}