diff options
Diffstat (limited to 'llvm/lib/Demangle/MicrosoftDemangleNodes.cpp')
-rw-r--r-- | llvm/lib/Demangle/MicrosoftDemangleNodes.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp index 8b15ffcee778..9fe157bf0d2a 100644 --- a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp +++ b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp @@ -107,6 +107,12 @@ static void outputCallingConvention(OutputStream &OS, CallingConv CC) { case CallingConv::Clrcall: OS << "__clrcall"; break; + case CallingConv::Swift: + OS << "__attribute__((__swiftcall__)) "; + break; + case CallingConv::SwiftAsync: + OS << "__attribute__((__swiftasynccall__)) "; + break; default: break; } @@ -117,7 +123,9 @@ std::string Node::toString(OutputFlags Flags) const { initializeOutputStream(nullptr, nullptr, OS, 1024); this->output(OS, Flags); OS << '\0'; - return {OS.getBuffer()}; + std::string Owned(OS.getBuffer()); + std::free(OS.getBuffer()); + return Owned; } void PrimitiveTypeNode::outputPre(OutputStream &OS, OutputFlags Flags) const { |