fix for -O C++ construction of variable names that use multiple module namespaces

This commit is contained in:
Vern Paxson 2024-08-09 09:27:22 -07:00 committed by Arne Welzel
parent 6faad5e5ca
commit 202c405a1e

View file

@ -111,9 +111,11 @@ string CPPCompile::LocalName(const ID* l) const {
auto n = l->Name(); auto n = l->Name();
auto without_module = strstr(n, "::"); auto without_module = strstr(n, "::");
if ( without_module ) while ( without_module ) {
return Canonicalize(without_module + 2); n = without_module + 2;
else without_module = strstr(n, "::");
}
return Canonicalize(n); return Canonicalize(n);
} }