diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 03:34:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-22 03:34:53 +0000 |
commit | 27dba671c3f158a33c8cbdf5196a6fd16489be03 (patch) | |
tree | c88d1aee0a870108bbc687bc833f38cce81d8051 /include/llvm/ADT | |
parent | 77696bebbcb011be861571b105193fc53614c153 (diff) | |
download | external_llvm-27dba671c3f158a33c8cbdf5196a6fd16489be03.zip external_llvm-27dba671c3f158a33c8cbdf5196a6fd16489be03.tar.gz external_llvm-27dba671c3f158a33c8cbdf5196a6fd16489be03.tar.bz2 |
Switch FoldingSet::AddString to StringRef based API.
- This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/FoldingSet.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 1465d04..c62c47d 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -18,7 +18,7 @@ #include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" -#include <string> +#include "llvm/ADT/StringRef.h" #include <iterator> namespace llvm { @@ -227,9 +227,7 @@ public: void AddInteger(long long I); void AddInteger(unsigned long long I); void AddBoolean(bool B) { AddInteger(B ? 1U : 0U); } - void AddString(const char* String, const char* End); - void AddString(const std::string &String); - void AddString(const char* String); + void AddString(StringRef String); template <typename T> inline void Add(const T& x) { FoldingSetTrait<T>::Profile(x, *this); } |