summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2013-09-18 09:08:52 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2013-09-18 09:08:52 +0000
commitd56929515691f707754721f18911f0282cfeb43c (patch)
tree50208b4835e8bb6b33ddd52d0f4ea1dcf5f745ac /lib/CodeGen/CodeGenFunction.cpp
parent43a8d85c2b25a8e21f99767680559316966cb57b (diff)
downloadclang-d56929515691f707754721f18911f0282cfeb43c.tar.gz
clang-d56929515691f707754721f18911f0282cfeb43c.tar.bz2
clang-d56929515691f707754721f18911f0282cfeb43c.tar.xz
Recommited:
Fix for PR16752. Second commit. PR16752: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width. 2. Fix handleModeAttr according to new methods in TargetInfo. Fixes: 1st Commit (Done): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function. Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions