Skip to content

Commit 460e7d5

Browse files
authored
[flang][debug] Correct pointer size. (#120781)
We were passing size in bytes for the sizeInBits field in DIDerivedTypeAttr with DW_TAG_pointer_type. Although this field is un-used in this case but better to be accurate.
1 parent 3ddc9f0 commit 460e7d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ mlir::LLVM::DITypeAttr DebugTypeGenerator::convertPointerLikeType(
638638

639639
return mlir::LLVM::DIDerivedTypeAttr::get(
640640
context, llvm::dwarf::DW_TAG_pointer_type,
641-
mlir::StringAttr::get(context, ""), elTyAttr, ptrSize,
641+
mlir::StringAttr::get(context, ""), elTyAttr, /*sizeInBits=*/ptrSize * 8,
642642
/*alignInBits=*/0, /*offset=*/0,
643643
/*optional<address space>=*/std::nullopt, /*extra data=*/nullptr);
644644
}

0 commit comments

Comments
 (0)