diff --git a/llvm/include/llvm/DWP/DWPStringPool.h b/llvm/include/llvm/DWP/DWPStringPool.h --- a/llvm/include/llvm/DWP/DWPStringPool.h +++ b/llvm/include/llvm/DWP/DWPStringPool.h @@ -32,7 +32,7 @@ MCStreamer &Out; MCSection *Sec; - DenseMap Pool; + StringMap Pool; uint32_t Offset = 0; public: @@ -41,7 +41,7 @@ uint32_t getOffset(const char *Str, unsigned Length) { assert(strlen(Str) + 1 == Length && "Ensure length hint is correct"); - auto Pair = Pool.insert(std::make_pair(Str, Offset)); + auto Pair = Pool.insert(std::make_pair(StringRef(Str, Length), Offset)); if (Pair.second) { Out.switchSection(Sec); Out.emitBytes(StringRef(Str, Length));