aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-12-16 02:57:00 +0000
committerMike Stump <mrs@apple.com>2009-12-16 02:57:00 +0000
commitb14e62d5aee7522b98c410ee65bd750c2cfe6f01 (patch)
tree3cb0a601613d390bb950797e77a16b909f73ef1a /lib/CodeGen/CodeGenFunction.h
parent5ee56e95c3905d2e7bc403631b03865cdbdd8a42 (diff)
Implement additional undefined checks for additional loads and stores. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 12e636c897..4bacd16f92 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -807,6 +807,8 @@ public:
llvm::Value* EmitCXXTypeidExpr(const CXXTypeidExpr *E);
llvm::Value *EmitDynamicCast(llvm::Value *V, const CXXDynamicCastExpr *DCE);
+ void EmitCheck(llvm::Value *, unsigned Size);
+
//===--------------------------------------------------------------------===//
// Declaration Emission
//===--------------------------------------------------------------------===//
@@ -921,6 +923,12 @@ public:
///
LValue EmitLValue(const Expr *E);
+ /// EmitCheckedLValue - Same as EmitLValue but additionally we generate
+ /// checking code to guard against undefined behavior. This is only
+ /// suitable when we know that the address will be used to access the
+ /// object.
+ LValue EmitCheckedLValue(const Expr *E);
+
/// EmitLoadOfScalar - Load a scalar value from an address, taking
/// care to appropriately convert from the memory representation to
/// the LLVM value representation.