[clang] 6d7de46 - [clang][Interp][NFC] Make Record field pointers const
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 00:59:09 PST 2024
Author: Timm Bäder
Date: 2024-02-19T09:58:52+01:00
New Revision: 6d7de46155fece05ab5a44aedd573a811f4b208a
URL: https://github.com/llvm/llvm-project/commit/6d7de46155fece05ab5a44aedd573a811f4b208a
DIFF: https://github.com/llvm/llvm-project/commit/6d7de46155fece05ab5a44aedd573a811f4b208a.diff
LOG: [clang][Interp][NFC] Make Record field pointers const
Added:
Modified:
clang/lib/AST/Interp/Record.h
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/Record.h b/clang/lib/AST/Interp/Record.h
index 284bb468d6af47..82294bb7dbbf96 100644
--- a/clang/lib/AST/Interp/Record.h
+++ b/clang/lib/AST/Interp/Record.h
@@ -80,7 +80,6 @@ class Record final {
unsigned getNumFields() const { return Fields.size(); }
const Field *getField(unsigned I) const { return &Fields[I]; }
- Field *getField(unsigned I) { return &Fields[I]; }
using const_base_iter = BaseList::const_iterator;
llvm::iterator_range<const_base_iter> bases() const {
@@ -122,7 +121,7 @@ class Record final {
/// Mapping from declarations to bases.
llvm::DenseMap<const RecordDecl *, Base *> BaseMap;
/// Mapping from field identifiers to descriptors.
- llvm::DenseMap<const FieldDecl *, Field *> FieldMap;
+ llvm::DenseMap<const FieldDecl *, const Field *> FieldMap;
/// Mapping from declarations to virtual bases.
llvm::DenseMap<const RecordDecl *, Base *> VirtualBaseMap;
/// Size of the structure.
More information about the cfe-commits
mailing list