summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd954638f02e77ed3ade66d60945f7ee60747e3b5 (patch)
tree197149147fb245fe77f0c5797c19569a16f0b07d /clang/lib/CodeGen/CodeGenFunction.h
parent7cc35b76c3eb20b1eae194317bff8872e5119086 (diff)
downloadbcm5719-llvm-d954638f02e77ed3ade66d60945f7ee60747e3b5.tar.gz
bcm5719-llvm-d954638f02e77ed3ade66d60945f7ee60747e3b5.zip
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. llvm-svn: 91198
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 1ddfa6d6c02..8820e6ec8b7 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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();
};
OpenPOWER on IntegriCloud