Skip to content

Commit 0ec153b

Browse files
authored
[flang][debug] Remove an unused function to fix build. (#123602)
1 parent af91372 commit 0ec153b

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -258,21 +258,6 @@ mlir::LLVM::DITypeAttr DebugTypeGenerator::convertBoxedSequenceType(
258258
dataLocation, /*rank=*/nullptr, allocated, associated);
259259
}
260260

261-
// If the type is a pointer or array type then gets its underlying type.
262-
static mlir::LLVM::DITypeAttr getUnderlyingType(mlir::LLVM::DITypeAttr Ty) {
263-
if (auto ptrTy =
264-
mlir::dyn_cast_if_present<mlir::LLVM::DIDerivedTypeAttr>(Ty)) {
265-
if (ptrTy.getTag() == llvm::dwarf::DW_TAG_pointer_type)
266-
Ty = getUnderlyingType(ptrTy.getBaseType());
267-
}
268-
if (auto comTy =
269-
mlir::dyn_cast_if_present<mlir::LLVM::DICompositeTypeAttr>(Ty)) {
270-
if (comTy.getTag() == llvm::dwarf::DW_TAG_array_type)
271-
Ty = getUnderlyingType(comTy.getBaseType());
272-
}
273-
return Ty;
274-
}
275-
276261
std::pair<std::uint64_t, unsigned short>
277262
DebugTypeGenerator::getFieldSizeAndAlign(mlir::Type fieldTy) {
278263
mlir::Type llvmTy;

0 commit comments

Comments
 (0)