forked from OSchip/llvm-project
[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:
parent
571d6a7120
commit
74acd744d3
|
@ -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;
|
||||
}];
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue