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 | 4cf9e690c5df0d90fdada4eabd3b203e4e906325 (patch) | |
tree | c88d1aee0a870108bbc687bc833f38cce81d8051 /include | |
parent | fa985152c3d160701fa55af97f598a478c3a456e (diff) | |
download | external_llvm-4cf9e690c5df0d90fdada4eabd3b203e4e906325.zip external_llvm-4cf9e690c5df0d90fdada4eabd3b203e4e906325.tar.gz external_llvm-4cf9e690c5df0d90fdada4eabd3b203e4e906325.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')
-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); } |