[cfe-commits] r145467 - /cfe/trunk/lib/Driver/Tools.cpp
Richard Smith
richard at metafoo.co.uk
Tue Nov 29 18:22:36 PST 2011
Hi Kostya,
Some ultra-minor nits...
On Wed, November 30, 2011 01:39, Kostya Serebryany wrote:
> Author: kcc
> Date: Tue Nov 29 19:39:16 2011
> New Revision: 145467
>
> when -faddress-sanitizer is present, add required flags to the linker command
> (linux-only)
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Tue Nov 29 19:39:16 2011
> @@ -1090,6 +1090,27 @@
> RelaxDefault);
> }
>
>
> +/// If AddressSanitizer is enabled, add appropriate linker flags (Linux).
> +/// This needs to be called before we add the C run-time (malloc, etc).
> +static void addAsanRTLinux(const ToolChain &TC, const ArgList &Args,
> + ArgStringList &CmdArgs) {
This line is under-indented.
> + // Add asan linker flags when linking an executable, but not a shared
object.
> + if (Args.hasArg(options::OPT_shared) ||
> + !Args.hasFlag(options::OPT_faddress_sanitizer,
> + options::OPT_fno_address_sanitizer, false))
> + return;
> + // LibAsan is "../lib/clang/linux/ArchName/libclang_rt.asan.a
A close quote in this comment would be great!
Thanks!
Richard
More information about the cfe-commits
mailing list