[PATCH] D118140: [flang] Change getLoweredName to translateNameToFrontendMangledName()
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 06:22:20 PST 2022
clementval created this revision.
clementval added a reviewer: schweitz.
Herald added a subscriber: mehdi_amini.
Herald added a project: Flang.
clementval requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.
getLoweredName() is not a well suited name change it to
translateNameToFrontendMangledName()
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118140
Files:
flang/include/flang/Optimizer/Dialect/FIRTypes.td
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/lib/Optimizer/Dialect/FIRType.cpp
Index: flang/lib/Optimizer/Dialect/FIRType.cpp
===================================================================
--- flang/lib/Optimizer/Dialect/FIRType.cpp
+++ flang/lib/Optimizer/Dialect/FIRType.cpp
@@ -642,7 +642,7 @@
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;
Index: flang/lib/Optimizer/CodeGen/CodeGen.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -1640,7 +1640,7 @@
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(
Index: flang/include/flang/Optimizer/Dialect/FIRTypes.td
===================================================================
--- flang/include/flang/Optimizer/Dialect/FIRTypes.td
+++ flang/include/flang/Optimizer/Dialect/FIRTypes.td
@@ -324,7 +324,7 @@
void finalize(llvm::ArrayRef<TypePair> lenPList,
llvm::ArrayRef<TypePair> typeList);
- std::string getLoweredName() const;
+ std::string translateNameToFrontendMangledName() const;
detail::RecordTypeStorage const *uniqueKey() const;
}];
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118140.402886.patch
Type: text/x-patch
Size: 1766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/1c4d15a6/attachment.bin>
More information about the llvm-commits
mailing list