diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-08 22:10:46 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-08 22:10:46 +0000 |
commit | b3198a841e7f356f171f1e11faff014b2deb1eb8 (patch) | |
tree | f115cc1178faeca731a111d9a02f0ccad49f9dba /lib/CodeGen/CodeGenFunction.h | |
parent | 4213e389d6f8fa96ab30eec0d932e4e3eee32997 (diff) |
add -fbounds-checking option.
When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend.
OK'ed by Chad; thanks for the review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index a25b02aac8..8d48a0b24e 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -591,6 +591,11 @@ public: /// we prefer to insert allocas. llvm::AssertingVH<llvm::Instruction> AllocaInsertPt; + /// BoundsChecking - Emit run-time bounds checks. Higher values mean + /// potentially higher performance penalties. + unsigned char BoundsChecking; + + /// CatchUndefined - Emit run-time checks to catch undefined behaviors. bool CatchUndefined; /// In ARC, whether we should autorelease the return value. |