Rail Shafigulin via llvm-dev
2016-Jun-08 18:26 UTC
[llvm-dev] default value for a newly created clang option
I've created a new clang option for my target through Options.td. Is there a way to give it a default value? -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160608/0f7ba340/attachment.html>
Eli Friedman via llvm-dev
2016-Jun-08 19:26 UTC
[llvm-dev] default value for a newly created clang option
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160608/49640b84/attachment.html>
Rail Shafigulin via llvm-dev
2016-Jun-08 21:30 UTC
[llvm-dev] default value for a newly created clang option
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>