Skip to content
Snippets Groups Projects
Commit b5217efa authored by Daniel Dunbar's avatar Daniel Dunbar
Browse files

Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84435 91177308-0d34-0410-b5e6-96231b3b80d8
parent 0533b302
No related branches found
No related tags found
No related merge requests found
...@@ -944,20 +944,29 @@ public: ...@@ -944,20 +944,29 @@ public:
ObjCCategoryDecl *getCategoryClass() const; 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 /// getNameAsCString - Get the name of identifier for the class
/// interface associated with this implementation as a C string /// interface associated with this implementation as a C string
/// (const char*). /// (const char*).
// //
// FIXME: Move to StringRef API. // FIXME: Deprecated, move clients to getName().
const char *getNameAsCString() const { const char *getNameAsCString() const {
return Id ? Id->getNameStart() : ""; return Id ? Id->getNameStart() : "";
} }
/// @brief Get the name of the class associated with this interface. /// @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 { std::string getNameAsString() const {
return Id ? Id->getNameStr() : ""; return getName();
} }
static bool classof(const Decl *D) { return D->getKind() == ObjCCategoryImpl;} static bool classof(const Decl *D) { return D->getKind() == ObjCCategoryImpl;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment