diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-18 20:25:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-18 20:25:46 +0000 |
commit | b5217efa5be2fd6be48d207267c8bcda6bf9206c (patch) | |
tree | 92567c938421c5e75858c2c4ed7d0ca01cff94c3 | |
parent | 0533b3020ca39898751d4200feed776861dcd1ce (diff) |
Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84435 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclObjC.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index f546e4cd27..d9bac0cff7 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -944,20 +944,29 @@ public: ObjCCategoryDecl *getCategoryClass() const; + /// getName - Get the name of identifier for the class interface associated + /// with this implementation as a StringRef. + // + // FIXME: This is a bad API, we are overriding the NamedDecl::getName, to mean + // something different. + llvm::StringRef getName() const { + return Id ? Id->getNameStart() : ""; + } + /// getNameAsCString - Get the name of identifier for the class /// interface associated with this implementation as a C string /// (const char*). // - // FIXME: Move to StringRef API. + // FIXME: Deprecated, move clients to getName(). const char *getNameAsCString() const { return Id ? Id->getNameStart() : ""; } /// @brief Get the name of the class associated with this interface. // - // FIXME: Move to StringRef API. + // FIXME: Deprecated, move clients to getName(). std::string getNameAsString() const { - return Id ? Id->getNameStr() : ""; + return getName(); } static bool classof(const Decl *D) { return D->getKind() == ObjCCategoryImpl;} |