ClRecover : Recover;
this->CompileKernel = ClEnableKasan.getNumOccurrences() > 0 ?
ClEnableKasan : CompileKernel;
- }
+ }
bool runOnModule(Module &M) override;
StringRef getPassName() const override { return "AddressSanitizerModule"; }
if (CanUsePrivateAliases && ClUsePrivateAliasForGlobals) {
// Create local alias for NewGlobal to avoid crash on ODR between
// instrumented and non-instrumented libraries.
- auto *GA = GlobalAlias::create(GlobalValue::InternalLinkage,
- NameForGlobal + M.getName(), NewGlobal);
+ auto *GA =
+ GlobalAlias::create(GlobalValue::PrivateLinkage, "", NewGlobal);
// With local aliases, we need to provide another externally visible
// symbol __odr_asan_XXX to detect ODR violation.
; Check that we generate internal alias and odr indicator symbols for global to be protected.
; CHECK: @__odr_asan_gen_a = internal global i8 0, align 1
-; CHECK: @"a<stdin>" = internal alias { [2 x i32], [56 x i8] }, { [2 x i32], [56 x i8] }* @a
+; CHECK: @0 = private alias { [2 x i32], [56 x i8] }, { [2 x i32], [56 x i8] }* @a
; Function Attrs: nounwind sanitize_address uwtable
define i32 @foo(i32 %M) #0 {