Add DWARFFormValue::getAsBlockData(), getAsBlockSize() and getAsFlag().

Frédéric Riss friss at apple.com
Wed Sep 3 23:57:33 PDT 2014


> On 04 Sep 2014, at 08:26, Frédéric Riss <friss at apple.com> wrote:
> 
>> 
>> On 03 Sep 2014, at 22:17, David Blaikie <dblaikie at gmail.com <mailto:dblaikie at gmail.com>> wrote:
>> 
>> LGTM
> 
> This is r217129

I had to push a fixup patch in r217132 where I changed ArrayRef<const uint8_t> to ArrayRef<uint8_t>. This did build correctly using libcxx, but failed with libstdc++. Looking at ArrayRef.h, I see now that ArrayRefs are const references anyway.

Fred

> Fred
> 
>> On Wed, Sep 3, 2014 at 12:24 PM, Frédéric Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
>> Here is a new patch with AsFlag removed in favor of accepting TC_Flag in getAsUnsignedConstant() and with getAsBlock implemented as per you suggestion. I can also split that in two pieces if that helps.
>> 
>> 
>> 
>>> On 03 Sep 2014, at 20:56, Frédéric Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
>>> 
>>> 
>>>> On 03 Sep 2014, at 20:52, David Blaikie <dblaikie at gmail.com <mailto:dblaikie at gmail.com>> wrote:
>>>> 
>>>> What's the need for the getAsFlag function?
>>> 
>>> FC_Flag is a separate class. I just mimicked the other variants. I can however fold FC_Flag into getAsUnsignedConstant(). This would make the followup patch about symbolic constants a tiny bit simpler.
>>> 
>>>> Perhaps the getAsBlockData/getAsBlockSize could be one function, returning an Optional<ArrayRef<uint8_t*>> ? ("getAsBlock”?)
>>> 
>>> Great suggestion. I’ll do that and rebase the rest.
>>> 
>>> Fred
>>> 
>>>> 
>>>> On Wed, Sep 3, 2014 at 11:47 AM, Frédéric Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
>>>> These new accessors will be used in subsequent patches.
>>>> 
>>>> OK to commit?
>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>> 
>> 
>> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140904/7ad75d03/attachment.html>


More information about the llvm-commits mailing list