File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ static bool getSymbolNameAddr(llvm::StringRef libraryName,
106106
107107 // UnDecorateSymbolName() will not fail for Swift symbols, so detect them
108108 // up-front and let Swift handle them.
109- if (!Demangle::isMangledName (syminfo. getSymbolName () )) {
109+ if (!Demangle::isMangledName (szSymbolName )) {
110110 char szUndName[1024 ];
111111 DWORD dwResult;
112112 dwResult = _swift_win32_withDbgHelpLibrary ([&] (HANDLE hProcess) -> DWORD {
@@ -119,7 +119,7 @@ static bool getSymbolNameAddr(llvm::StringRef libraryName,
119119 dwFlags |= UNDNAME_32_BIT_DECODE;
120120#endif
121121
122- return UnDecorateSymbolName (syminfo. getSymbolName () , szUndName,
122+ return UnDecorateSymbolName (szSymbolName , szUndName,
123123 sizeof (szUndName), dwFlags);
124124 });
125125
Original file line number Diff line number Diff line change @@ -72,8 +72,6 @@ const void *SymbolInfo::getSymbolAddress() const {
7272struct Win32ModuleInfo {
7373 const char *name;
7474 const void *base;
75-
76- Win32ModuleInfo (const char *n, const void *b) : name(n), base(b) {}
7775};
7876
7977// Get the filename and base of the module that contains the specified
@@ -117,17 +115,17 @@ static Win32ModuleInfo moduleInfoFromAddress(const void *address) {
117115 if (pwszFileName != wszBuffer)
118116 ::free (pwszFileName);
119117
120- return Win32ModuleInfo ( ::strdup (" <unknown>" ), mi.lpBaseOfDll ) ;
118+ return { ::strdup (" <unknown>" ), mi.lpBaseOfDll } ;
121119 }
122120
123121 const char *result = _swift_win32_copyUTF8FromWide (pwszFileName);
124122
125123 if (pwszFileName != wszBuffer)
126124 ::free ((void *)pwszFileName);
127125
128- return Win32ModuleInfo ( result, mi.lpBaseOfDll ) ;
126+ return { result, mi.lpBaseOfDll } ;
129127 } else {
130- return Win32ModuleInfo ( ::strdup (" <unknown>" ), nullptr ) ;
128+ return { ::strdup (" <unknown>" ), nullptr } ;
131129 }
132130}
133131#endif
You can’t perform that action at this time.
0 commit comments