[compiler-rt] r182372 - [nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.

Peter Collingbourne peter at pcc.me.uk
Mon May 27 09:03:25 PDT 2013


On Mon, May 27, 2013 at 06:05:10PM +0400, Timur Iskhodzhanov wrote:
> 2013/5/27 Alexey Samsonov <samsonov at google.com>:
> >
> > On Mon, May 27, 2013 at 5:41 PM, Peter Collingbourne <peter at pcc.me.uk>
> > wrote:
> >>
> >> On Thu, May 23, 2013 at 06:21:33PM +0400, Alexey Samsonov wrote:
> >> > Can we use existing SANITIZER_SUPPORTS_WEAK_HOOKS macro to fix this?
> >>
> >> We could enclose the "&& SymbolizeCode" part in an ifdef, but I think this
> >> would be kind of ugly.
> >>
> >> One idea I had was to define a macro like this:
> >>
> >> #if SANITIZER_WINDOWS
> >> # define SANITIZER_HAS_WEAK_SYMBOL(s) 1
> >> #else
> >> # define SANITIZER_HAS_WEAK_SYMBOL(s) (&(s))
> >> #endif
> >
> >
> > I like this idea.
> +1

We found that using the address-of operator silences this warning,
so we don't need this macro.  Fixed in r182740. 

Thanks,
-- 
Peter



More information about the llvm-commits mailing list