Here is the preliminary patch.
It wraps the uint64_t bitmask into a class, but still provides "uint64_t
Raw();"
(mostly for serialization/deserialization methods).
Before the full review, I'd like to get a general feedback: is this how we
want this to be done?
The patch passes 'make check' on one platform, but needs more testing.
I also want to add at least one attribute after the 32-nd bit to verify
that it works.
It may also make sense to move some functions
(e.g. constructAlignmentFromInt) inside the class definition,
but I'd prefer to have it as a separate commit.
--kcc
On Thu, Jan 12, 2012 at 1:25 PM, Chris Lattner <clattner at apple.com>
wrote:
>
> On Jan 12, 2012, at 1:03 PM, Anton Korobeynikov wrote:
>
> > Hi Kostya,
> >
> >> How about implementing Attributes as a class with 64-bit integer
under
> the
> >> hood?
> >> This will protect us from erroneous casts to/from 32-bit unsigned.
> >> I have a change half-done but I want to know llvmdev's opinion
before
> >> proceeding.
> > Yes, this sounds like a proper approach. Which will allow us to switch
> > over other implementation of attributes, if necessary.
>
> +1 :)
>
> -Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/e0031286/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attr_llvm.patch
Type: text/x-patch
Size: 23841 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/e0031286/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attr_clang.patch
Type: text/x-patch
Size: 2309 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/e0031286/attachment-0001.bin>