[clang] 97732dd - [clang][bytecode][NFC] Make Program::getNativePointer() const (#169502)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 26 00:10:27 PST 2025
Author: Timm Baeder
Date: 2025-11-26T09:10:23+01:00
New Revision: 97732ddb5d921a7d5cd6ffc2a23438b607c0d3f6
URL: https://github.com/llvm/llvm-project/commit/97732ddb5d921a7d5cd6ffc2a23438b607c0d3f6
DIFF: https://github.com/llvm/llvm-project/commit/97732ddb5d921a7d5cd6ffc2a23438b607c0d3f6.diff
LOG: [clang][bytecode][NFC] Make Program::getNativePointer() const (#169502)
Added:
Modified:
clang/lib/AST/ByteCode/Program.cpp
clang/lib/AST/ByteCode/Program.h
Removed:
################################################################################
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