diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-06 10:58:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-06 10:58:06 +0000 |
commit | 2928c83b010f7cfdb0f819199d806f6942a7d995 (patch) | |
tree | 0c5a62b287e4c2c693330584a8f1d6024defde66 /include/llvm/TypeSymbolTable.h | |
parent | c128b3e74eaba34a8f6d2b8c3dc19861b9cbd901 (diff) |
Pass StringRef by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/TypeSymbolTable.h')
-rw-r--r-- | include/llvm/TypeSymbolTable.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h index d84196f05e..26b1dbf2df 100644 --- a/include/llvm/TypeSymbolTable.h +++ b/include/llvm/TypeSymbolTable.h @@ -58,26 +58,26 @@ public: /// incrementing an integer and appending it to the name, if necessary /// @returns the unique name /// @brief Get a unique name for a type - std::string getUniqueName(const StringRef &BaseName) const; + std::string getUniqueName(StringRef BaseName) const; /// This method finds the type with the given \p name in the type map /// and returns it. /// @returns null if the name is not found, otherwise the Type /// associated with the \p name. /// @brief Lookup a type by name. - Type *lookup(const StringRef &name) const; + Type *lookup(StringRef name) const; /// Lookup the type associated with name. /// @returns end() if the name is not found, or an iterator at the entry for /// Type. - iterator find(const StringRef &Name) { + iterator find(StringRef Name) { return tmap.find(Name); } /// Lookup the type associated with name. /// @returns end() if the name is not found, or an iterator at the entry for /// Type. - const_iterator find(const StringRef &Name) const { + const_iterator find(StringRef Name) const { return tmap.find(Name); } @@ -119,7 +119,7 @@ public: /// a many-to-one mapping between names and types. This method allows a type /// with an existing entry in the symbol table to get a new name. /// @brief Insert a type under a new name. - void insert(const StringRef &Name, const Type *Typ); + void insert(StringRef Name, const Type *Typ); /// Remove a type at the specified position in the symbol table. /// @returns the removed Type. |