Author: Timm Bäder Date: 2022-10-28T12:49:34+02:00 New Revision: b61e8c517eff2083252b1b74544bc25f7ad5a368
URL: https://github.com/llvm/llvm-project/commit/b61e8c517eff2083252b1b74544bc25f7ad5a368 DIFF: https://github.com/llvm/llvm-project/commit/b61e8c517eff2083252b1b74544bc25f7ad5a368.diff LOG: [clang][Interp][NFC] Add Record::getName() Useful for debugging. 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 7743ad8dbb6fd..38920f75fe120 100644 --- a/clang/lib/AST/Interp/Record.h +++ b/clang/lib/AST/Interp/Record.h @@ -48,6 +48,8 @@ class Record final { public: /// Returns the underlying declaration. const RecordDecl *getDecl() const { return Decl; } + /// Returns the name of the underlying declaration. + const std::string getName() const { return Decl->getNameAsString(); } /// Checks if the record is a union. bool isUnion() const { return getDecl()->isUnion(); } /// Returns the size of the record. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits