From: Benjamin Kramer Date: Tue, 31 Jul 2012 11:45:39 +0000 (+0000) Subject: Remove deprecated getNameAsCString methods. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94be8ea90795d00fe2a97fea9a9a727911a70997;p=clang Remove deprecated getNameAsCString methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161044 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 42dd5a3a27..6c39f2c3ab 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -1524,15 +1524,6 @@ public: 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: 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: Deprecated, move clients to getName(). @@ -1653,15 +1644,6 @@ public: return getIdentifier()->getName(); } - /// 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. - const char *getNameAsCString() const { - return getName().data(); - } - /// @brief Get the name of the class associated with this interface. // // FIXME: Move to StringRef API. diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 864b4ebe1f..ef802a3ed0 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -2515,7 +2515,7 @@ llvm::Constant *CGObjCMac::EmitMetaClass(const ObjCImplementationDecl *ID, Values); std::string Name("\01L_OBJC_METACLASS_"); - Name += ID->getNameAsCString(); + Name += ID->getName(); // Check for a forward reference. llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);