We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35e346f commit 01c752eCopy full SHA for 01c752e
lib/IRGen/IRGenDebugInfo.cpp
@@ -1688,9 +1688,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1688
// to emit the (target!) size of the underlying basic type.
1689
uint64_t SizeOfByte = CI.getTargetInfo().getCharWidth();
1690
// FIXME: SizeInBits is redundant with DbgTy, remove it.
1691
- uint64_t SizeInBits = 0;
1692
- if (DbgTy.getTypeSizeInBits())
1693
- SizeInBits = *DbgTy.getTypeSizeInBits();
+ auto *llvmty = IGM.getStorageTypeForUnlowered(DbgTy.getType());
+ uint64_t SizeInBits = llvmty->isSized() ? IGM.DataLayout.getTypeSizeInBits(llvmty) : 0;
1694
unsigned AlignInBits = DbgTy.hasDefaultAlignment()
1695
? 0
1696
: DbgTy.getAlignment().getValue() * SizeOfByte;
0 commit comments