[PATCH] Fix parsing armv{6,7}hl triples

Jonathan Roelofs jonathan at codesourcery.com
Tue May 5 12:45:02 PDT 2015



On 5/5/15 3:37 AM, İsmail Dönmez wrote:
> On Mon, May 4, 2015 at 4:59 PM, Jonathan Roelofs
> <jonathan at codesourcery.com> wrote:
>>
>>
>> On 4/27/15 4:21 AM, İsmail Dönmez wrote:
>>>
>>> Hi,
>>>
>>> This fixes a regression in failing to parse armv7hl-* and armv6hl-*
>>> triples. Most notably SUSE and Redhat uses those
>>> (armv7hl-suse-linux-gnueabi ...). Not sure how to test this though.
>>
>>
>> Have you looked at unittest/ADT/TripleTest.cpp ?
>>
>> With a testcase, LGTM.
>
> Submitted as r236492 with a test, thanks!
>
>>> Since StringSwitch accepts at most 5 arguments I had to split the v6
>>> lines.
>>
>>
>> I've always wondered why that isn't a variadic template function...
>
> Would be nice if someone with a knowledge fixed that.

I played around with it for a bit, and couldn't figure out how to 
preserve the string literal length trick after making it a parameter 
pack. It also gets kinda messy because the last argument has the value, 
which is not particularly convenient to access without a bunch of extra 
template magic... Oh well.


Jon

>
> ismail
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded




More information about the llvm-commits mailing list