diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /include/llvm/TypeSymbolTable.h | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'include/llvm/TypeSymbolTable.h')
-rw-r--r-- | include/llvm/TypeSymbolTable.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h index e1459b0..4dd3a4a 100644 --- a/include/llvm/TypeSymbolTable.h +++ b/include/llvm/TypeSymbolTable.h @@ -19,6 +19,8 @@ namespace llvm { +class StringRef; + /// This class provides a symbol table of name/type pairs with operations to /// support constructing, searching and iterating over the symbol table. The /// class derives from AbstractTypeUser so that the contents of the symbol @@ -55,14 +57,24 @@ 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 std::string &BaseName) const; + std::string getUniqueName(const 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 std::string& name) const; + Type *lookup(const 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); + + /// 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; /// @returns true iff the symbol table is empty. /// @brief Determine if the symbol table is empty @@ -102,7 +114,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 std::string &Name, const Type *Typ); + void insert(const StringRef &Name, const Type *Typ); /// Remove a type at the specified position in the symbol table. /// @returns the removed Type. |