[cfe-commits] adding "-fasan" flag

Chandler Carruth chandlerc at google.com
Tue Nov 15 23:30:19 PST 2011


On Tue, Nov 15, 2011 at 11:24 PM, Kostya Serebryany <kcc at google.com> wrote:

> Meanwhile, I removed -DADDRESS_SANITIZER from the patch.
> Please take another look.
>
> We can reinstate the macro or implement __has_feature/__has_extension when
> we decide what is the right thing to do.
>

That seems like a fine plan to me.

One style nit on the patch:

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 144759)
+++ lib/Driver/Tools.cpp (working copy)
@@ -1701,6 +1701,11 @@
   if (getToolChain().SupportsProfiling())
     Args.AddLastArg(CmdArgs, options::OPT_pg);

+  if (Args.hasFlag(options::OPT_faddress_sanitizer,
+                   options::OPT_fno_address_sanitizer, false)) {
+    CmdArgs.push_back("-faddress-sanitizer");
+  }
+

No need for {}s here.

Otherwise, I think this looks good, but I would wait for John's OK before
committing as he owns Clang's IRGen, and this seems like something he
should sign off on. =]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111115/bbad401d/attachment.html>


More information about the cfe-commits mailing list