Will Dietz
f54319c891
[ubsan] Add support for -fsanitize-blacklist
...
llvm-svn: 172808
2013-01-18 11:30:38 +00:00
Dmitri Gribenko
f857950d39
Remove useless 'llvm::' qualifier from names like StringRef and others that are
...
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
2013-01-12 19:30:44 +00:00
David Tweed
9fb566c076
Testing with a full OpenCL compiler (based on clang) reveals r71734 missed
...
difference between type widths of a vector and the width of one of its elements
in the case of vector shifts. Use correct witdth in the vector case.
llvm-svn: 172047
2013-01-10 09:11:33 +00:00
Will Dietz
cefb44869a
[ubsan] Use correct type for compound assignment ops.
...
llvm-svn: 171801
2013-01-07 22:25:52 +00:00
David Tweed
042e0883cb
Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be
...
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.
llvm-svn: 171755
2013-01-07 16:43:27 +00:00
Chandler Carruth
ffd5551bc7
Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
...
reflect the migration in r171366.
Re-sort the #include lines to reflect the new paths.
llvm-svn: 171369
2013-01-02 11:45:17 +00:00
Benjamin Kramer
7a14bc0f4c
Simplify vector splat code. No functionality change.
...
llvm-svn: 171350
2013-01-01 20:08:10 +00:00
Richard Smith
d82a2ce3a0
Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!
...
llvm-svn: 170837
2012-12-21 03:17:28 +00:00
NAKAMURA Takumi
3df909d030
Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."
...
It broke stage2.
llvm-svn: 170835
2012-12-21 02:50:38 +00:00
Richard Smith
789ce142df
Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member.
...
llvm-svn: 170806
2012-12-20 23:49:09 +00:00
Chandler Carruth
3a02247dc9
Sort all of Clang's files under 'lib', and fix up the broken headers
...
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
2012-12-04 09:13:33 +00:00
Will Dietz
88e0233ff4
[ubsan] Add flag to enable recovery from checks when possible.
...
llvm-svn: 169114
2012-12-02 19:50:33 +00:00
Will Dietz
1897cb3b9c
Add -fsanitize=integer for reporting suspicious integer behaviors.
...
Introduces new sanitizer "unsigned-integer-overflow".
llvm-svn: 168701
2012-11-27 15:01:55 +00:00
Lang Hames
65992f454c
Make -ffp-contract a codegen option, rather than a laguage option. This makes
...
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.
llvm-svn: 168027
2012-11-15 07:51:26 +00:00
Richard Smith
c86a114409
Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.
...
llvm-svn: 167433
2012-11-06 02:30:30 +00:00
Richard Smith
b1b0ab41e7
Use the individual -fsanitize=<...> arguments to control which of the UBSan
...
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.
llvm-svn: 167413
2012-11-05 22:21:05 +00:00
Richard Smith
9c6890a792
Simplify: replace getContext().getLangOpts() with just getLangOpts().
...
llvm-svn: 167261
2012-11-01 22:30:59 +00:00
Richard Smith
3494df490b
Clean up misapplication of diff.
...
llvm-svn: 167260
2012-11-01 22:16:43 +00:00
Richard Smith
de67068fc1
Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
...
separate functions, since they share essentially no code.
llvm-svn: 167259
2012-11-01 22:15:34 +00:00
Richard Smith
e29c441a89
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
...
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.
llvm-svn: 167258
2012-11-01 22:13:39 +00:00
Douglas Gregor
b0eea8b54b
Switch CodeGenOptions over to a .def file, like we do with LangOptions.
...
llvm-svn: 166497
2012-10-23 20:05:01 +00:00
Richard Smith
f9a1e4ab7d
-fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
...
from a floating-point type where the source value is not in the range of
representable values of the destination type.
llvm-svn: 165843
2012-10-12 22:57:06 +00:00
Richard Smith
e30752c93b
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.
...
llvm-svn: 165536
2012-10-09 19:52:38 +00:00
Micah Villmow
dd31ca10ef
Move TargetData to DataLayout.
...
llvm-svn: 165395
2012-10-08 16:25:52 +00:00
Lang Hames
4c8559e0a1
Fail early with a clear assert if an operation with multiple uses somehow ends
...
up being contracted during codegen.
llvm-svn: 165197
2012-10-04 03:23:25 +00:00