http://llvm.org/bugs/show_bug.cgi?id=16752
Bug ID: 16752
Summary: Subject: 'mode' attribute for unusual targets doesn't
work properly
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 10958
--> http://llvm.org/bugs/attachment.cgi?id=10958&action=edit
Patch
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 virtual
methods. By default current behaviour could be implemented here.
2. Fix handleModeAttr according to new methods in TargetInfo.
This approach is implemented in the patch attached to this post.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs