summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2013-09-10 08:18:44 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2013-09-10 08:18:44 +0000
commit9fd13796946d089a7a37084ef31c183328a60786 (patch)
treea1b1347c2578035a0b0fc84d770c94b2d4266fff /lib/CodeGen/CGExpr.cpp
parent1e24463067cd8d270e67cc926341e43e6b6f019a (diff)
downloadclang-9fd13796946d089a7a37084ef31c183328a60786.tar.gz
clang-9fd13796946d089a7a37084ef31c183328a60786.tar.bz2
clang-9fd13796946d089a7a37084ef31c183328a60786.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions