[PATCH] D118140: [flang] Change getLoweredName to translateNameToFrontendMangledName()

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 23:52:54 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG74acd744d35e: [flang] Change getLoweredName to translateNameToFrontendMangledName() (authored by clementval).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118140/new/

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.403150.patch
Type: text/x-patch
Size: 1766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220126/148efe4e/attachment.bin>


More information about the llvm-commits mailing list