From: Timm Bäder Date: Fri, 16 Sep 2022 16:26:24 +0000 (+0200) Subject: [clang][Interp][NFC] Make some Record methods const X-Git-Tag: upstream/17.0.6~32139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f5b061254744dedd95b6c0d03b909b4084611a3;p=platform%2Fupstream%2Fllvm.git [clang][Interp][NFC] Make some Record methods const --- diff --git a/clang/lib/AST/Interp/Record.h b/clang/lib/AST/Interp/Record.h index db559d7..117dd2b 100644 --- a/clang/lib/AST/Interp/Record.h +++ b/clang/lib/AST/Interp/Record.h @@ -66,7 +66,7 @@ public: return llvm::make_range(Fields.begin(), Fields.end()); } - unsigned getNumFields() { return Fields.size(); } + unsigned getNumFields() const { return Fields.size(); } Field *getField(unsigned I) { return &Fields[I]; } using const_base_iter = BaseList::const_iterator; @@ -74,7 +74,7 @@ public: return llvm::make_range(Bases.begin(), Bases.end()); } - unsigned getNumBases() { return Bases.size(); } + unsigned getNumBases() const { return Bases.size(); } Base *getBase(unsigned I) { return &Bases[I]; } using const_virtual_iter = VirtualBaseList::const_iterator; @@ -82,7 +82,7 @@ public: return llvm::make_range(VirtualBases.begin(), VirtualBases.end()); } - unsigned getNumVirtualBases() { return VirtualBases.size(); } + unsigned getNumVirtualBases() const { return VirtualBases.size(); } Base *getVirtualBase(unsigned I) { return &VirtualBases[I]; } private: