From 87d98a73005d42dc233c4f5bf191fc0496193716 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 2 Nov 2022 00:17:16 -0700 Subject: [PATCH] [hwasan] Remove no-op setDSOLocal. NFC PrivateLinkage and HiddenVisibility are implicitly dso_local. --- llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index eb54069..2a4b640 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -497,12 +497,10 @@ void HWAddressSanitizer::createHwasanCtorComdat() { new GlobalVariable(M, Int8Arr0Ty, true, GlobalVariable::ExternalLinkage, nullptr, "__start_hwasan_globals"); Start->setVisibility(GlobalValue::HiddenVisibility); - Start->setDSOLocal(true); auto Stop = new GlobalVariable(M, Int8Arr0Ty, true, GlobalVariable::ExternalLinkage, nullptr, "__stop_hwasan_globals"); Stop->setVisibility(GlobalValue::HiddenVisibility); - Stop->setDSOLocal(true); // Null-terminated so actually 8 bytes, which are required in order to align // the note properly. @@ -516,7 +514,6 @@ void HWAddressSanitizer::createHwasanCtorComdat() { Note->setSection(".note.hwasan.globals"); Note->setComdat(NoteComdat); Note->setAlignment(Align(4)); - Note->setDSOLocal(true); // The pointers in the note need to be relative so that the note ends up being // placed in rodata, which is the standard location for notes. -- 2.7.4