#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/Instrumentation.h"
-#include "llvm/Transforms/Instrumentation/AddressSanitizerPass.h"
#include "llvm/Transforms/Instrumentation/BoundsChecking.h"
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
#include "llvm/Transforms/ObjCARC.h"
CodeGenOpts.DebugPassManager);
}
}
-
- if (LangOpts.Sanitize.has(SanitizerKind::Address)) {
- bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address);
- MPM.addPass(createModuleToFunctionPassAdaptor(
- AddressSanitizerPass(/*CompileKernel=*/false, Recover,
- CodeGenOpts.SanitizeAddressUseAfterScope)));
- bool ModuleUseAfterScope = asanUseGlobalsGC(TargetTriple, CodeGenOpts);
- MPM.addPass(AddressSanitizerPass(/*CompileKernel=*/false, Recover,
- ModuleUseAfterScope));
- }
}
// FIXME: We still use the legacy pass manager to do code generation. We
+++ /dev/null
-; RUN: %clang_cc1 -S -emit-llvm -o - -fexperimental-new-pass-manager -fsanitize=address %s | FileCheck %s
-
-; CHECK: @llvm.global_ctors = {{.*}}@asan.module_ctor
-; CHECK: declare void @__asan_loadN
-
-define i32 @test_load(i32* %a) sanitize_address {
-entry:
- %tmp1 = load i32, i32* %a, align 4
- ret i32 %tmp1
-}