Skip to content

Conversation

@abidh
Copy link
Contributor

@abidh abidh commented Jan 20, 2025

No description provided.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jan 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 20, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Abid Qadeer (abidh)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/123602.diff

1 Files Affected:

  • (modified) flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp (-15)
diff --git a/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp b/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
index 3f77547b91ae5d..555f354521c9b7 100644
--- a/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
+++ b/flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
@@ -258,21 +258,6 @@ mlir::LLVM::DITypeAttr DebugTypeGenerator::convertBoxedSequenceType(
       dataLocation, /*rank=*/nullptr, allocated, associated);
 }
 
-// If the type is a pointer or array type then gets its underlying type.
-static mlir::LLVM::DITypeAttr getUnderlyingType(mlir::LLVM::DITypeAttr Ty) {
-  if (auto ptrTy =
-          mlir::dyn_cast_if_present<mlir::LLVM::DIDerivedTypeAttr>(Ty)) {
-    if (ptrTy.getTag() == llvm::dwarf::DW_TAG_pointer_type)
-      Ty = getUnderlyingType(ptrTy.getBaseType());
-  }
-  if (auto comTy =
-          mlir::dyn_cast_if_present<mlir::LLVM::DICompositeTypeAttr>(Ty)) {
-    if (comTy.getTag() == llvm::dwarf::DW_TAG_array_type)
-      Ty = getUnderlyingType(comTy.getBaseType());
-  }
-  return Ty;
-}
-
 std::pair<std::uint64_t, unsigned short>
 DebugTypeGenerator::getFieldSizeAndAlign(mlir::Type fieldTy) {
   mlir::Type llvmTy;

@abidh
Copy link
Contributor Author

abidh commented Jan 20, 2025

This PR just removes an unused function and should fix the build bots. So I am going to merge it.

@abidh abidh merged commit 0ec153b into llvm:main Jan 20, 2025
8 of 9 checks passed
@abidh abidh deleted the fix_build branch February 5, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants