[llvm] [Sanitizer] Use DK_OptimizationRemarkMissed for DiagnosticInfoInstrumentation. (PR #106356)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 02:38:36 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Chaitanya (skc7)

<details>
<summary>Changes</summary>

#<!-- -->99439 DiagnosticInfoInstrumentation initializes DiagnosticInfo with DK_Linker. 
Diagnostic message reporting here for instrumentation matches with optimisation remark rather than DK_Linker.
This PR replaces DK_LINKER with DK_OptimizationRemarkMissed.

---
Full diff: https://github.com/llvm/llvm-project/pull/106356.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Instrumentation/Instrumentation.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
index 305bae0e2010d1..ce742460bcdf5b 100644
--- a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
@@ -32,7 +32,7 @@ class DiagnosticInfoInstrumentation : public DiagnosticInfo {
 public:
   DiagnosticInfoInstrumentation(const Twine &DiagMsg,
                                 DiagnosticSeverity Severity = DS_Warning)
-      : DiagnosticInfo(DK_Linker, Severity), Msg(DiagMsg) {}
+      : DiagnosticInfo(DK_OptimizationRemarkMissed, Severity), Msg(DiagMsg) {}
   void print(DiagnosticPrinter &DP) const override { DP << Msg; }
 };
 } // namespace

``````````

</details>


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


More information about the llvm-commits mailing list