[llvm] [asan] Ensure __asan_register_elf_globals is called in COMDAT asan.module_ctor (PR #67745)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 14:55:27 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff de85739ded2edddc568f287d4f94c2dc1ab97dd7 69e5698f04f217b7f3e4cd1737ce1d8126229e61 -- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 2c6070004..758997146 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -2519,7 +2519,8 @@ bool ModuleAddressSanitizer::InstrumentGlobals(IRBuilder<> &IRB, Module &M,
     // function will be called. The module destructor is not created when n ==
     // 0.
     *CtorComdat = true;
-    InstrumentGlobalsELF(IRB, M, NewGlobals, Initializers, getUniqueModuleId(&M));
+    InstrumentGlobalsELF(IRB, M, NewGlobals, Initializers,
+                         getUniqueModuleId(&M));
   } else if (n == 0) {
     // When UseGlobalsGC is false, COMDAT can still be used if n == 0, because
     // all compile units will have identical module constructor/destructor.

``````````

</details>


https://github.com/llvm/llvm-project/pull/67745


More information about the llvm-commits mailing list