Add a new Value::getNameStr method, which is preferred over getName.
authorChris Lattner <sabre@nondot.org>
Thu, 15 Feb 2007 18:53:54 +0000 (18:53 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 Feb 2007 18:53:54 +0000 (18:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34310 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Value.h
lib/VMCore/Value.cpp

index 95d86ce7826f2447bae3d354c6a1ce584e643ef4..ddfcbb69796ff83947941228f0fba2d65c4938dd 100644 (file)
@@ -87,7 +87,8 @@ public:
 
   // All values can potentially be named...
   inline bool hasName() const { return Name != 0; }
-  std::string getName() const;
+  std::string getName() const { return getNameStr(); }
+  std::string getNameStr() const;
   ValueName *getValueName() const { return Name; }
 
   void setName(const std::string &name);
index c7af93135986b230863a453f37c124a8f52f0b7c..4d4944c010cf72217062aa911cf92c409e1200ad 100644 (file)
@@ -112,7 +112,7 @@ static bool getSymTab(Value *V, ValueSymbolTable *&ST) {
   return false;
 }
 
-std::string Value::getName() const {
+std::string Value::getNameStr() const {
   if (Name == 0) return "";
   return std::string(Name->getKeyData(),
                      Name->getKeyData()+Name->getKeyLength());