Skip to content

Commit c5981f0

Browse files
committed
use string representation of symbols for back reference comparison
1 parent 4637bdf commit c5981f0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/dmangle.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public:
178178
{
179179
// cannot put C++ classes into a hash table, tries to call toHash
180180
size_t[void*] types;
181-
size_t[void*] symbols;
181+
size_t[string] symbols;
182182
size_t[void*] idents;
183183
}
184184
OutBuffer* buf;
@@ -209,12 +209,13 @@ public:
209209
{
210210
version(useBackref)
211211
{
212-
if (auto p = cast(void*)s in symbols)
212+
string id = s.getIdent();
213+
if (auto p = id in symbols)
213214
{
214215
buf.printf("%d$", cast(int)*p);
215216
return true;
216217
}
217-
symbols[cast(void*)s] = symbols.length;
218+
symbols[id] = symbols.length;
218219
}
219220
return false;
220221
}

0 commit comments

Comments
 (0)