const TString *TFunction::buildMangledName() const
{
    std::string newName = mangleName(getName()).c_str();

    for (const auto &p : parameters)
    {
        newName += p.type->getMangledName().c_str();
    }

    return NewPoolTString(newName.c_str());
}
Exemple #2
0
std::string Mangler::encode(FunctionSymbol* symbol) {
  auto funTy = symbol->type()->asFunctionType();
  assert(funTy);
  return "_Z" + mangleName(symbol->name(), symbol->type()) + mangleBareFunctionType(funTy);
}