summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3f6f9febadbd8fd44c11d769793e9bd747b8f97d (patch)
tree2efd4134868af32f38f94e966072c7e8067daadd /clang/lib/CodeGen/CodeGenFunction.h
parentdd7418ae3fee995440f0a34092ae29bc6d65af6b (diff)
downloadbcm5719-llvm-3f6f9febadbd8fd44c11d769793e9bd747b8f97d.tar.gz
bcm5719-llvm-3f6f9febadbd8fd44c11d769793e9bd747b8f97d.zip
Implement additional undefined checks for additional loads and stores. WIP.
llvm-svn: 91498
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 12e636c8970..4bacd16f928 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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.
OpenPOWER on IntegriCloud