aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
index 54e2e19340..f96b45752b 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
@@ -173,6 +173,14 @@ bool PNaClABIVerifyFunctions::runOnFunction(Function &F) {
}
}
+ for (User::const_op_iterator OI = BBI->op_begin(), OE = BBI->op_end();
+ OI != OE; OI++) {
+ if (isa<ConstantExpr>(OI)) {
+ Reporter->addError() << "Function " << F.getName() <<
+ " contains disallowed ConstantExpr\n";
+ }
+ }
+
// Get types hiding in metadata attached to the instruction
SmallVector<std::pair<unsigned, MDNode*>, 4> MDForInst;
BBI->getAllMetadataOtherThanDebugLoc(MDForInst);