aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-12-12 01:27:46 +0000
committerMike Stump <mrs@apple.com>2009-12-12 01:27:46 +0000
commit9c276ae0f24d4cee8f7954069d4b8eae45d0447d (patch)
tree967ccefb7c10869562faaa2dd6f5b9feb43c8ce7 /lib/CodeGen/CodeGenFunction.h
parent498eb7ece2a5699e215acf071040de27d7882931 (diff)
Implement runtime checks for undefined behavior. WIP.
This implements a new flag -fcatch-undefined-behavior. The flag turns on additional runtime checks for: T a[I]; a[i] abort when i < 0 or i >= I. Future stuff includes shifts by >= bitwidth amounts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 1ddfa6d6c0..8820e6ec8b 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -108,6 +108,7 @@ public:
uint32_t LLVMPointerWidth;
bool Exceptions;
+ bool CatchUndefined;
public:
/// ObjCEHValueStack - Stack of Objective-C exception values, used for
/// rethrows.
@@ -1266,6 +1267,11 @@ private:
ArgType));
}
}
+
+ llvm::BasicBlock *AbortBB;
+ /// getAbortBB - Create a basic block that will call abort. We'll generate
+ /// a branch around the created basic block as necessary.
+ llvm::BasicBlock* getAbortBB();
};