From ba1f04007baf376c5f5ccf7ef23588399942de7b Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 15 Oct 2012 14:22:56 +0000 Subject: [PATCH] [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165937 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 52a75f680e..262b844db3 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -175,7 +175,7 @@ void EmitAssemblyHelper::CreatePasses() { } if (LangOpts.AddressSanitizer) { - PMBuilder.addExtension(PassManagerBuilder::EP_ScalarOptimizerLate, + PMBuilder.addExtension(PassManagerBuilder::EP_OptimizerLast, addAddressSanitizerPass); PMBuilder.addExtension(PassManagerBuilder::EP_EnabledOnOptLevel0, addAddressSanitizerPass); -- 2.40.0