Skip to content

Commit 34b6842

Browse files
authored
Merge pull request swiftlang#78548 from compnerd/spelling
runtime: use the preferred spelling on Windows (NFCI)
2 parents 0920186 + 627e795 commit 34b6842

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/runtime/Demangle.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,11 @@ char *swift_demangle(const char *mangledName,
949949

950950
// If the output buffer is not provided, malloc memory ourselves.
951951
if (outputBuffer == nullptr || *outputBufferSize == 0) {
952+
#if defined(_WIN32)
953+
return _strdup(result.c_str());
954+
#else
952955
return strdup(result.c_str());
956+
#endif
953957
}
954958

955959
// Copy into the provided buffer.

0 commit comments

Comments
 (0)