summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/pr12251.cpp
Commit message (Collapse)AuthorAgeFilesLines
* A number of test cases assume that an "int" parameter or return valueUlrich Weigand2012-10-241-2/+2
| | | | | | | | | | | | | will be represented in the IR as a plain "i32" type. This causes the tests to spuriously fail on platforms where int is not a 32-bit type, or where the ABI requires attributes like "signext" or "zeroext" to be used. This patch adds -triple or -target parameters to force those tests to use the i386-unknown-unknown target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166551 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the emission of strict enum range metadata behind a flag (the sameChandler Carruth2012-03-271-1/+8
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153550 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copy and pasto.Rafael Espindola2012-03-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153385 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back r153360 with a fix for enums that cover all the 32 bit values.Rafael Espindola2012-03-241-0/+139
| | | | | | Thanks to NAKAMURA Takumi for finding it! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153383 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r153360 (and r153380), "Second part of PR12251. Produce the range ↵NAKAMURA Takumi2012-03-241-121/+0
| | | | | | | | | | metadata in clang for booleans and". For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier. It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153382 91177308-0d34-0410-b5e6-96231b3b80d8
* On i386 the alignment of i64 is 4, not 8.Benjamin Kramer2012-03-241-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153380 91177308-0d34-0410-b5e6-96231b3b80d8
* Second part of PR12251. Produce the range metadata in clang for booleans andRafael Espindola2012-03-241-0/+121
c++ enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153360 91177308-0d34-0410-b5e6-96231b3b80d8