[llvm] [ASan] AddressSanitizerPass constructor should honor the AsanCtorKind argument (PR #72330)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 22:25:51 PST 2023


================
@@ -1149,7 +1152,7 @@ AddressSanitizerPass::AddressSanitizerPass(
     AsanCtorKind ConstructorKind)
     : Options(Options), UseGlobalGC(UseGlobalGC),
       UseOdrIndicator(UseOdrIndicator), DestructorKind(DestructorKind),
-      ConstructorKind(ClConstructorKind) {}
+      ConstructorKind(ConstructorKind) {}
----------------
aeubanks wrote:

should check if the `cl::opt` was set instead of defaulting to `invalid` (can't remember the exact method, `hasValue()`?)

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


More information about the llvm-commits mailing list