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,
106
106
107
107
// UnDecorateSymbolName() will not fail for Swift symbols, so detect them
108
108
// up-front and let Swift handle them.
109
- if (!Demangle::isMangledName (syminfo. getSymbolName () )) {
109
+ if (!Demangle::isMangledName (szSymbolName )) {
110
110
char szUndName[1024 ];
111
111
DWORD dwResult;
112
112
dwResult = _swift_win32_withDbgHelpLibrary ([&] (HANDLE hProcess) -> DWORD {
@@ -119,7 +119,7 @@ static bool getSymbolNameAddr(llvm::StringRef libraryName,
119
119
dwFlags |= UNDNAME_32_BIT_DECODE;
120
120
#endif
121
121
122
- return UnDecorateSymbolName (syminfo. getSymbolName () , szUndName,
122
+ return UnDecorateSymbolName (szSymbolName , szUndName,
123
123
sizeof (szUndName), dwFlags);
124
124
});
125
125
Original file line number Diff line number Diff line change @@ -72,8 +72,6 @@ const void *SymbolInfo::getSymbolAddress() const {
72
72
struct Win32ModuleInfo {
73
73
const char *name;
74
74
const void *base;
75
-
76
- Win32ModuleInfo (const char *n, const void *b) : name(n), base(b) {}
77
75
};
78
76
79
77
// Get the filename and base of the module that contains the specified
@@ -117,17 +115,17 @@ static Win32ModuleInfo moduleInfoFromAddress(const void *address) {
117
115
if (pwszFileName != wszBuffer)
118
116
::free (pwszFileName);
119
117
120
- return Win32ModuleInfo ( ::strdup (" <unknown>" ), mi.lpBaseOfDll ) ;
118
+ return { ::strdup (" <unknown>" ), mi.lpBaseOfDll } ;
121
119
}
122
120
123
121
const char *result = _swift_win32_copyUTF8FromWide (pwszFileName);
124
122
125
123
if (pwszFileName != wszBuffer)
126
124
::free ((void *)pwszFileName);
127
125
128
- return Win32ModuleInfo ( result, mi.lpBaseOfDll ) ;
126
+ return { result, mi.lpBaseOfDll } ;
129
127
} else {
130
- return Win32ModuleInfo ( ::strdup (" <unknown>" ), nullptr ) ;
128
+ return { ::strdup (" <unknown>" ), nullptr } ;
131
129
}
132
130
}
133
131
#endif
You can’t perform that action at this time.
0 commit comments