diff options
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index cd66eeb..c39e3ea 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -941,6 +941,15 @@ static std::string getMangledTypeStr(Type *Ty, bool &HasUnnamedType) { Result += "nx"; Result += "v" + utostr(EC.getKnownMinValue()) + getMangledTypeStr(VTy->getElementType(), HasUnnamedType); + } else if (TargetExtType *TETy = dyn_cast<TargetExtType>(Ty)) { + Result += "t"; + Result += TETy->getName(); + for (Type *ParamTy : TETy->type_params()) + Result += "_" + getMangledTypeStr(ParamTy, HasUnnamedType); + for (unsigned IntParam : TETy->int_params()) + Result += "_" + utostr(IntParam); + // Ensure nested target extension types are distinguishable. + Result += "t"; } else if (Ty) { switch (Ty->getTypeID()) { default: llvm_unreachable("Unhandled type"); |