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

Hans Wennborg hans at chromium.org
Wed Jun 27 09:39:37 PDT 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftls-model2.patch
Type: application/octet-stream
Size: 12497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120627/2ea36e0c/attachment.obj>


More information about the cfe-commits mailing list