From b61e8c517eff2083252b1b74544bc25f7ad5a368 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 26 Oct 2022 11:24:41 +0200 Subject: [PATCH] [clang][Interp][NFC] Add Record::getName() Useful for debugging. --- clang/lib/AST/Interp/Record.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/AST/Interp/Record.h b/clang/lib/AST/Interp/Record.h index 7743ad8..38920f7 100644 --- a/clang/lib/AST/Interp/Record.h +++ b/clang/lib/AST/Interp/Record.h @@ -48,6 +48,8 @@ public: 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. -- 2.7.4