From b14e62d5aee7522b98c410ee65bd750c2cfe6f01 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 16 Dec 2009 02:57:00 +0000 Subject: 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 --- lib/CodeGen/CodeGenFunction.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/CodeGen/CodeGenFunction.h') 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. -- cgit v1.2.3-18-g5258