[cfe-commits] [Patch] Add -ftls-model command-line flag (pr9788)

Hans Wennborg hans at chromium.org
Thu Jun 28 01:04:25 PDT 2012


On Wed, Jun 27, 2012 at 7:49 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> LGTM

Thanks! Landed r159336.

 - Hans


> On 27 June 2012 12:39, Hans Wennborg <hans at chromium.org> wrote:
>> On Wed, Jun 27, 2012 at 3:30 PM, Rafael EspĂ­ndola
>> <rafael.espindola at gmail.com> wrote:
>>> On 26 June 2012 13:40, Hans Wennborg <hans at chromium.org> wrote:
>>>> The attached patch adds support for the -ftls-model command-line flag.
>>>> Please take a look.
>>>
>>> There was some work at unifying Options.td and CC1Options.td. Do we
>>> have to change both?
>>
>> Ah, thanks for pointing that out. Seems like changing Options.td is enough.
>>
>> While investigating this, I stumbled across CodeGenOptions, which I
>> think might be a better fit for this flag than LangOptions, so moving
>> it there.
>>
>>> Why does
>>>
>>> llvm::GlobalVariable::ThreadLocalMode GetLLVMTLSModel(StringRef S)
>>>
>>> need DefaultCase?
>>
>> It doesn't. Removed.
>>
>>> Can you use a switch over Opts.getDefaultTLSModel in
>>> CompilerInvocation.cpp
>>
>> Done.
>>
>>> and a StringSwitch over the Model?
>>
>> Done.
>>
>> New patch attached.
>>
>> Thanks,
>> Hans




More information about the cfe-commits mailing list