[PATCH] D96571: [ASan] Introduce a way set different ways of emitting module destructors.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 16:48:22 PST 2021
vitalybuka accepted this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:2175
+ if (DestructorKind != AsanDtorKind::None) {
+ IRBuilder<> IRB_Dtor(CreateAsanModuleDtor(M));
+ IRB_Dtor.CreateCall(AsanUnregisterElfGlobals,
----------------
delcypher wrote:
> vitalybuka wrote:
> > Please fix all clang-tidy
> I didn't change the variable name for the IRBuilder so this problem was in the code before my change. Should fixing this be in a separate change seeing as the code clean up isn't really related to change I'm making?
Oh, I didn't noticed that this was preexisting.
================
Comment at: llvm/test/Instrumentation/AddressSanitizer/no_global_dtors.ll:1
+; Check Default behaviour still emits dtors
+; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -S | \
----------------
RUN: without line break is more readable
and clang format does not enforce 80char limit in tests
================
Comment at: llvm/test/Instrumentation/AddressSanitizer/no_global_dtors.ll:1-22
+; Check Default behaviour still emits dtors
+; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -S | \
+; RUN: FileCheck -check-prefix=CHECK-DEFAULT %s
+; RUN: opt < %s -passes='asan-pipeline' -S | \
+; RUN: FileCheck -check-prefix=CHECK-DEFAULT %s
+; CHECK-DEFAULT: llvm.global_dtor{{.+}}asan.module_dtor
+; CHECK-DEFAULT: define internal void @asan.module_dtor
----------------
vitalybuka wrote:
> RUN: without line break is more readable
> and clang format does not enforce 80char limit in tests
80char is not enforced in tests
and < can be avoided
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96571/new/
https://reviews.llvm.org/D96571
More information about the llvm-commits
mailing list