[llvm] [DebugInfo][NFC] Constify debug DbgVariableRecord::{isDbgValue,isDbgDeclare} (PR #105570)

Matt Davis via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 11:53:10 PDT 2024


https://github.com/enferex created https://github.com/llvm/llvm-project/pull/105570

 Constify debug DbgVariableRecord::{isDbgValue,isDbgDeclare}.

>From a24830568ea29b3bf867e3377bd0824d2280bbc9 Mon Sep 17 00:00:00 2001
From: Matt Davis <mattd at nvidia.com>
Date: Wed, 21 Aug 2024 10:39:25 -0700
Subject: [PATCH] [DebugInfo][NFC] Constify debug
 DbgVariableRecord::{isDbgValue,isDbgDeclare}

---
 llvm/include/llvm/IR/DebugProgramInstruction.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm/IR/DebugProgramInstruction.h b/llvm/include/llvm/IR/DebugProgramInstruction.h
index 8d7427cc67e2d9..f5aa34678a53a5 100644
--- a/llvm/include/llvm/IR/DebugProgramInstruction.h
+++ b/llvm/include/llvm/IR/DebugProgramInstruction.h
@@ -398,8 +398,8 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
     }
   };
 
-  bool isDbgDeclare() { return Type == LocationType::Declare; }
-  bool isDbgValue() { return Type == LocationType::Value; }
+  bool isDbgDeclare() const { return Type == LocationType::Declare; }
+  bool isDbgValue() const { return Type == LocationType::Value; }
 
   /// Get the locations corresponding to the variable referenced by the debug
   /// info intrinsic.  Depending on the intrinsic, this could be the



More information about the llvm-commits mailing list