diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp b/contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp index d07d05a08c55..494cdabad41f 100644 --- a/contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp +++ b/contrib/llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp @@ -121,8 +121,8 @@ std::string Node::toString(OutputFlags Flags) const { OutputBuffer OB; initializeOutputBuffer(nullptr, nullptr, OB, 1024); this->output(OB, Flags); - OB << '\0'; - std::string Owned(OB.getBuffer()); + StringView SV = OB; + std::string Owned(SV.begin(), SV.end()); std::free(OB.getBuffer()); return Owned; } |