[flang-commits] [flang] 0ec153b - [flang][debug] Remove an unused function to fix build. (#123602)
via flang-commits
flang-commits at lists.llvm.org
Mon Jan 20 04:18:31 PST 2025
Author: Abid Qadeer
Date: 2025-01-20T12:18:27Z
New Revision: 0ec153b9fde70da3b46292d0627b3896e0bdceab
URL: https://github.com/llvm/llvm-project/commit/0ec153b9fde70da3b46292d0627b3896e0bdceab
DIFF: https://github.com/llvm/llvm-project/commit/0ec153b9fde70da3b46292d0627b3896e0bdceab.diff
LOG: [flang][debug] Remove an unused function to fix build. (#123602)
Added:
Modified:
flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
Removed:
################################################################################
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;
More information about the flang-commits
mailing list