[llvm-dev] default value for a newly created clang option

Rail Shafigulin via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 8 14:30:06 PDT 2016


Tnanks Eli. That's the route I've taken.

On Wed, Jun 8, 2016 at 12:26 PM, Eli Friedman <eli.friedman at gmail.com>
wrote:

> On Wed, Jun 8, 2016 at 11:26 AM, Rail Shafigulin via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> I've created a new clang option for my target through Options.td. Is
>> there a way to give it a default value?
>>
>
> Usually cfe-dev is better for questions like this.
>
> clang driver options don't inherently have default values; you just
> compute a default value if the flag isn't specified.  There are some
> helpers to simplify this; for example, ArgList::hasFlag lets you specify
> whether the default is true or false.
>
> -Eli
>



-- 
Rail Shafigulin
Software Engineer
Esencia Technologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160608/87fadecd/attachment.html>


More information about the llvm-dev mailing list