summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-18 20:25:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-18 20:25:46 +0000
commite175bb194171fdf0bf0b5051e957bc445b9f0011 (patch)
treecc04d2a93466908e3bc0be27c27eb470192eeb37
parent19351639fbc9a79300714f69aa8d969aeb9fcbcf (diff)
downloadbcm5719-llvm-e175bb194171fdf0bf0b5051e957bc445b9f0011.tar.gz
bcm5719-llvm-e175bb194171fdf0bf0b5051e957bc445b9f0011.zip
Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.
llvm-svn: 84435
-rw-r--r--clang/include/clang/AST/DeclObjC.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h
index f546e4cd27c..d9bac0cff72 100644
--- a/clang/include/clang/AST/DeclObjC.h
+++ b/clang/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;}
OpenPOWER on IntegriCloud