hanchenye-llvm-project/clang/lib
Chandler Carruth 8b4140d712 Move the emission of strict enum range metadata behind a flag (the same
flag as GCC uses: -fstrict-enums). There is a *lot* of code making
unwarranted assumptions about the underlying type of enums, and it
doesn't seem entirely reasonable to eagerly break all of it.

Much more importantly, the current state of affairs is *very* good at
optimizing based upon this information, which causes failures that are
very distant from the actual enum. Before we push for enabling this by
default, I think we need to implement -fcatch-undefined-behavior support
for instrumenting and trapping whenever we store or load a value outside
of the range. That way we can track down the misbehaving code very
quickly.

I discussed this with Rafael, and currently the only important cases he
is aware of are the bool range-based optimizations which are staying
hard enabled. We've not seen any issue with those either, and they are
much more important for performance.

llvm-svn: 153550
2012-03-27 23:58:37 +00:00
..
ARCMigrate
AST Introduce a new libclang API to determine the parent context of a code 2012-03-27 23:34:16 +00:00
Analysis
Basic Add better support for $fp and $sp for mips inline asm support. 2012-03-27 19:56:11 +00:00
CodeGen Move the emission of strict enum range metadata behind a flag (the same 2012-03-27 23:58:37 +00:00
Driver Move the emission of strict enum range metadata behind a flag (the same 2012-03-27 23:58:37 +00:00
Edit
Frontend Move the emission of strict enum range metadata behind a flag (the same 2012-03-27 23:58:37 +00:00
FrontendTool Introduce a -cc1-level option -pubnames-dump, which simply dumps the 2012-03-27 18:06:49 +00:00
Headers
Index
Lex [preprocessor] Handle correctly inclusion directives that have macro expansions, e.g 2012-03-27 18:47:48 +00:00
Parse If we see '(...' where we're expecting an abstract-declarator, that doesn't 2012-03-27 23:05:05 +00:00
Rewrite modern objective-c translator: writing objc boolean literals. 2012-03-27 20:17:30 +00:00
Sema Introduce a new libclang API to determine the parent context of a code 2012-03-27 23:34:16 +00:00
Serialization Canonicalize the declaration we write to a PCH file for an 2012-03-26 15:52:37 +00:00
StaticAnalyzer [analyzer] Add an option to re-analyze a dead-end path without inlining. 2012-03-27 20:02:53 +00:00
CMakeLists.txt
Makefile