Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 86c04a0

Browse files
committed
[MS demangler] Use a slightly shorter unmangling for mangled strings.
Before: const wchar_t * {L"%"} Now: L"%" See also PR39593. Differential Revision: https://reviews.llvm.org/D54294 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346544 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5ac7dfd commit 86c04a0

File tree

3 files changed

+376
-377
lines changed

3 files changed

+376
-377
lines changed

lib/Demangle/MicrosoftDemangleNodes.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,21 @@ void EncodedStringLiteralNode::output(OutputStream &OS,
161161
OutputFlags Flags) const {
162162
switch (Char) {
163163
case CharKind::Wchar:
164-
OS << "const wchar_t * {L\"";
164+
OS << "L\"";
165165
break;
166166
case CharKind::Char:
167-
OS << "const char * {\"";
167+
OS << "\"";
168168
break;
169169
case CharKind::Char16:
170-
OS << "const char16_t * {u\"";
170+
OS << "u\"";
171171
break;
172172
case CharKind::Char32:
173-
OS << "const char32_t * {U\"";
173+
OS << "U\"";
174174
break;
175175
}
176176
OS << DecodedString << "\"";
177177
if (IsTruncated)
178178
OS << "...";
179-
OS << "}";
180179
}
181180

182181
void IntegerLiteralNode::output(OutputStream &OS, OutputFlags Flags) const {

test/Demangle/ms-operators.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
; CHECK: `struct S & __cdecl getS(void)'::`2'::`local static guard'{2}
154154

155155
??_C@_02PCEFGMJL@hi?$AA@
156-
; CHECK: const char * {"hi"}
156+
; CHECK: "hi"
157157

158158
??_DDiamond@@QEAAXXZ
159159
; CHECK: void __cdecl Diamond::`vbase dtor'(void)

0 commit comments

Comments
 (0)