summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-09-23 23:26:57 +0000
committerReid Kleckner <reid@kleckner.net>2013-09-23 23:26:57 +0000
commit36cf1f02f8bc0a96170dd9101c760db070f7fb63 (patch)
tree33fd6026ab2903f523a8eec4da69ae8f1f1f3c28 /clang/lib/Frontend/CompilerInvocation.cpp
parentc71eb6adc30cbb28e467e5145bb0a6ee13ebb0f3 (diff)
downloadbcm5719-llvm-36cf1f02f8bc0a96170dd9101c760db070f7fb63.tar.gz
bcm5719-llvm-36cf1f02f8bc0a96170dd9101c760db070f7fb63.zip
Explicitly request unsigned enum types when desired
The underlying type of all plain enums in MSVC is 'int', even if the enumerator contains large 32-bit unsigned values or values greater than UINT_MAX. The only way to get a large or unsigned enum type is to request it explicitly with the C++11 strong enum types feature. However, since LLVM isn't C++11 yet, I had to add a conditional LLVM_ENUM_INT_TYPE to Compiler.h to control its usage. The motivating true positive for this change is compiling PointerIntPair with MSVC for win64. The PointerIntMask value is supposed to be pointer sized value of all ones with some low zeros. Instead, it's truncated to 32-bits! We are only saved later because it is sign extended back in the AND with int64_t, and we happen to want all ones. This silences lots of -Wmicrosoft warnings during a clang self-host targeting Windows. llvm-svn: 191241
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud