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

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


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

#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.

>From 2655ca18dfdd195a88dc42ff0e773561ce142167 Mon Sep 17 00:00:00 2001
From: skc7 <Krishna.Sankisa at amd.com>
Date: Wed, 28 Aug 2024 15:03:27 +0530
Subject: [PATCH] [Sanitizer] Use DK_OptimizationRemarkMissed for
 DiagnosticInfoInstrumentation.

---
 llvm/lib/Transforms/Instrumentation/Instrumentation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the llvm-commits mailing list