[llvm-commits] [llvm] r144933 - in /llvm/trunk: lib/Transforms/Instrumentation/AddressSanitizer.cpp test/Instrumentation/AddressSanitizer/do-not-touch-odr-global.ll

NAKAMURA Takumi geek4civic at gmail.com
Thu Nov 17 15:36:12 PST 2011


Kostya,

> --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu Nov 17 17:14:59 2011
> @@ -448,8 +448,11 @@
>
>     if (!Ty->isSized()) continue;
>     if (!G->hasInitializer()) continue;
> -    if (GlobalVariable::mayBeOverridden(G->getLinkage()) ||
> -        G->getLinkage() == GlobalVariable::AppendingLinkage)
> +    // Touch only those globals that will not be defined in other modules.
> +    // Don't handle ODR type linkages since other modules may be built w/o asan.
> +    if (G->getLinkage() != GlobalVariable::GlobalVariable::ExternalLinkage &&
> +        G->getLinkage() != GlobalVariable::GlobalVariable::PrivateLinkage &&
> +        G->getLinkage() != GlobalVariable::GlobalVariable::InternalLinkage)
>       continue;
>     // For now, just ignore this Alloca if the alignment is large.
>     if (G->getAlignment() > RedzoneSize) continue;

What is "GlobalVariable::GlobalVariable::"?
FYI, MSVC does not accept them.

...Takumi




More information about the llvm-commits mailing list