[clang] [clang][bytecode][NFC] Make Program::getNativePointer() const (PR #169502)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 25 07:29:32 PST 2025
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/169502
None
>From a91753edc31451d77b7fd704a1e5636ed94b1739 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 25 Nov 2025 16:28:57 +0100
Subject: [PATCH] [clang][bytecode][NFC] Make Program::getNativePointer() const
---
clang/lib/AST/ByteCode/Program.cpp | 2 +-
clang/lib/AST/ByteCode/Program.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp
index c468303efea7e..d96934071cb60 100644
--- a/clang/lib/AST/ByteCode/Program.cpp
+++ b/clang/lib/AST/ByteCode/Program.cpp
@@ -27,7 +27,7 @@ unsigned Program::getOrCreateNativePointer(const void *Ptr) {
return It->second;
}
-const void *Program::getNativePointer(unsigned Idx) {
+const void *Program::getNativePointer(unsigned Idx) const {
return NativePointers[Idx];
}
diff --git a/clang/lib/AST/ByteCode/Program.h b/clang/lib/AST/ByteCode/Program.h
index cc9127dc77860..c8795504391fa 100644
--- a/clang/lib/AST/ByteCode/Program.h
+++ b/clang/lib/AST/ByteCode/Program.h
@@ -58,7 +58,7 @@ class Program final {
unsigned getOrCreateNativePointer(const void *Ptr);
/// Returns the value of a marshalled native pointer.
- const void *getNativePointer(unsigned Idx);
+ const void *getNativePointer(unsigned Idx) const;
/// Emits a string literal among global data.
unsigned createGlobalString(const StringLiteral *S,
More information about the cfe-commits
mailing list