[flang] Change getLoweredName to translateNameToFrontendMangledName()

getLoweredName() is not a well suited name change it to
translateNameToFrontendMangledName()

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D118140
This commit is contained in:
Valentin Clement 2022-01-25 22:53:20 +01:00
parent 571d6a7120
commit 74acd744d3
No known key found for this signature in database
GPG Key ID: 086D54783C928776
3 changed files with 3 additions and 3 deletions

View File

@ -324,7 +324,7 @@ def fir_RecordType : FIR_Type<"Record", "type"> {
void finalize(llvm::ArrayRef<TypePair> lenPList,
llvm::ArrayRef<TypePair> typeList);
std::string getLoweredName() const;
std::string translateNameToFrontendMangledName() const;
detail::RecordTypeStorage const *uniqueKey() const;
}];

View File

@ -1640,7 +1640,7 @@ struct EmboxCommonConversion : public FIROpConversion<OP> {
mlir::Value
getTypeDescriptor(BOX box, mlir::ConversionPatternRewriter &rewriter,
mlir::Location loc, fir::RecordType recType) const {
std::string name = recType.getLoweredName();
std::string name = recType.translateNameToFrontendMangledName();
auto module = box->template getParentOfType<mlir::ModuleOp>();
if (auto global = module.template lookupSymbol<fir::GlobalOp>(name)) {
auto ty = mlir::LLVM::LLVMPointerType::get(

View File

@ -642,7 +642,7 @@ unsigned fir::RecordType::getFieldIndex(llvm::StringRef ident) {
return std::numeric_limits<unsigned>::max();
}
std::string fir::RecordType::getLoweredName() const {
std::string fir::RecordType::translateNameToFrontendMangledName() const {
auto split = getName().split('T');
std::string name = (split.first + "E.dt." + split.second).str();
return name;