mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//===-- StringPool.h - Interned string pool -------------------------------===//
|
||||
//===-- StringPool.h - Interned string pool ---------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@@ -64,12 +64,7 @@ namespace llvm {
|
||||
/// intern - Adds a string to the pool and returns a reference-counted
|
||||
/// pointer to it. No additional memory is allocated if the string already
|
||||
/// exists in the pool.
|
||||
PooledStringPtr intern(const char *Begin, const char *End);
|
||||
|
||||
/// intern - Adds a null-terminated string to the pool and returns a
|
||||
/// reference-counted pointer to it. No additional memory is allocated if
|
||||
/// the string already exists in the pool.
|
||||
inline PooledStringPtr intern(const char *Str);
|
||||
PooledStringPtr intern(const StringRef &Str);
|
||||
|
||||
/// empty - Checks whether the pool is empty. Returns true if so.
|
||||
///
|
||||
@@ -139,10 +134,6 @@ namespace llvm {
|
||||
inline bool operator!=(const PooledStringPtr &That) { return S != That.S; }
|
||||
};
|
||||
|
||||
PooledStringPtr StringPool::intern(const char *Str) {
|
||||
return intern(Str, Str + strlen(Str));
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user