[llvm] [ASan] AddressSanitizerPass constructor should honor the AsanCtorKind argument (PR #72330)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 16:43:23 PST 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 3dc098d39215228ca78e99c100ed31b87e5bbdd6 41e51898676b1a44331febe4427f3580ed30f15f -- llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h b/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
index 48da3c99d6..b3e6a4ff8a 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
@@ -20,11 +20,7 @@ enum class AsanDtorKind {
};
/// Types of ASan module constructors supported
-enum class AsanCtorKind {
- None,
- Global,
- Invalid
-};
+enum class AsanCtorKind { None, Global, Invalid };
/// Mode of ASan detect stack use after return
enum class AsanDetectStackUseAfterReturnMode {
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 0e1fa6a2bc..02662ede26 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -350,8 +350,7 @@ static cl::opt<bool> ClSkipPromotableAllocas(
cl::init(true));
static cl::opt<AsanCtorKind> ClConstructorKind(
- "asan-constructor-kind",
- cl::desc("Sets the ASan constructor kind"),
+ "asan-constructor-kind", cl::desc("Sets the ASan constructor kind"),
cl::values(clEnumValN(AsanCtorKind::None, "none", "No constructors"),
clEnumValN(AsanCtorKind::Global, "global",
"Use global constructors")),
``````````
</details>
https://github.com/llvm/llvm-project/pull/72330
More information about the llvm-commits
mailing list