diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /include/clang/Basic/Sanitizers.def | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'include/clang/Basic/Sanitizers.def')
-rw-r--r-- | include/clang/Basic/Sanitizers.def | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/include/clang/Basic/Sanitizers.def b/include/clang/Basic/Sanitizers.def new file mode 100644 index 0000000..085ca16 --- /dev/null +++ b/include/clang/Basic/Sanitizers.def @@ -0,0 +1,69 @@ +//===--- Sanitizers.def - Runtime sanitizer options -------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the options for specifying which runtime sanitizers to +// enable. Users of this file must define the SANITIZER macro to make use of +// this information. Users of this file can also define the SANITIZER_GROUP +// macro to get information on options which refer to sets of sanitizers. +// +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER +#error "Define SANITIZER prior to including this file!" +#endif + +// SANITIZER(NAME, ID) + +// The first value is the name of the sanitizer as a string. The sanitizer can +// be enabled by specifying -fsanitize=NAME. + +// The second value is an identifier which can be used to refer to the +// sanitizer. + + +// SANITIZER_GROUP(NAME, ID, ALIAS) + +// The first two values have the same semantics as the corresponding SANITIZER +// values. The third value is an expression ORing together the IDs of individual +// sanitizers in this group. + +#ifndef SANITIZER_GROUP +#define SANITIZER_GROUP(NAME, ID, ALIAS) +#endif + + +// AddressSanitizer +SANITIZER("address", Address) + +// ThreadSanitizer +SANITIZER("thread", Thread) + +// UndefinedBehaviorSanitizer +SANITIZER("signed-integer-overflow", SignedIntegerOverflow) +SANITIZER("divide-by-zero", DivideByZero) +SANITIZER("shift", Shift) +SANITIZER("unreachable", Unreachable) +SANITIZER("return", Return) +SANITIZER("vla-bound", VLABound) +SANITIZER("alignment", Alignment) +SANITIZER("null", Null) +SANITIZER("vptr", Vptr) +SANITIZER("object-size", ObjectSize) +SANITIZER("float-cast-overflow", FloatCastOverflow) + +// -fsanitize=undefined (and its alias -fcatch-undefined-behavior). This should +// include all the sanitizers which have low overhead, no ABI or address space +// layout implications, and only catch undefined behavior. +SANITIZER_GROUP("undefined", Undefined, + SignedIntegerOverflow | DivideByZero | Shift | Unreachable | + Return | VLABound | Alignment | Null | Vptr | ObjectSize | + FloatCastOverflow) + +#undef SANITIZER +#undef SANITIZER_GROUP |