Remove top-level Clang -fsanitize= flags for optional ASan features.

Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.

The only problem I see is that users won't be able to disable extra
instrumentation for init-order and use-after-scope by a top-level Clang flag.
But this instrumentation was implicitly enabled for quite a while and
we didn't hear from users hurt by it.

llvm-svn: 210924
This commit is contained in:
Alexey Samsonov
2014-06-13 17:53:44 +00:00
parent 51472bc600
commit e595e1ade0
20 changed files with 41 additions and 147 deletions

View File

@@ -183,13 +183,8 @@ static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
const PassManagerBuilderWrapper &BuilderWrapper =
static_cast<const PassManagerBuilderWrapper&>(Builder);
const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts();
const LangOptions &LangOpts = BuilderWrapper.getLangOpts();
PM.add(createAddressSanitizerFunctionPass(LangOpts.Sanitize.InitOrder,
LangOpts.Sanitize.UseAfterReturn,
LangOpts.Sanitize.UseAfterScope));
PM.add(createAddressSanitizerModulePass(
LangOpts.Sanitize.InitOrder,
CGOpts.SanitizerBlacklistFile));
PM.add(createAddressSanitizerFunctionPass());
PM.add(createAddressSanitizerModulePass(CGOpts.SanitizerBlacklistFile));
}
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,