summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_handlers.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-02-23 02:40:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-02-23 02:40:07 +0000
commita0b1e21d72429c3672115b3ddc85240e3b7ac88b (patch)
tree6338b8f9aedaa5fb6277297a3744cdbc050bc2ae /lib/ubsan/ubsan_handlers.h
parent0b487c02ed906e555fa473cea5afcd6363549373 (diff)
ubsan: Runtime handlers for array indexing checks.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_handlers.h')
-rw-r--r--lib/ubsan/ubsan_handlers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ubsan/ubsan_handlers.h b/lib/ubsan/ubsan_handlers.h
index d6a042481..5e237e1aa 100644
--- a/lib/ubsan/ubsan_handlers.h
+++ b/lib/ubsan/ubsan_handlers.h
@@ -67,6 +67,15 @@ struct ShiftOutOfBoundsData {
RECOVERABLE(shift_out_of_bounds, ShiftOutOfBoundsData *Data,
ValueHandle LHS, ValueHandle RHS)
+struct OutOfBoundsData {
+ SourceLocation Loc;
+ const TypeDescriptor &ArrayType;
+ const TypeDescriptor &IndexType;
+};
+
+/// \brief Handle an array index out of bounds error.
+RECOVERABLE(out_of_bounds, OutOfBoundsData *Data, ValueHandle Index)
+
struct UnreachableData {
SourceLocation Loc;
};