File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1021,12 +1021,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1021
1021
return getOrCreateType (BlandDbgTy);
1022
1022
}
1023
1023
1024
- uint64_t getSizeOfBasicType (DebugTypeInfo DbgTy) {
1024
+ uint64_t getSizeOfBasicType (CompletedDebugTypeInfo DbgTy) {
1025
1025
uint64_t SizeOfByte = CI.getTargetInfo ().getCharWidth ();
1026
1026
uint64_t BitWidth = 0 ;
1027
- assert (DbgTy.getSize () && " non-fixed basic type" );
1028
1027
if (DbgTy.getSize ())
1029
- BitWidth = DbgTy.getSize ()-> getValue () * SizeOfByte;
1028
+ BitWidth = DbgTy.getSizeValue () * SizeOfByte;
1030
1029
llvm::Type *StorageType = DbgTy.getStorageType ()
1031
1030
? DbgTy.getStorageType ()
1032
1031
: IGM.DataLayout .getSmallestLegalIntType (
@@ -1288,13 +1287,15 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1288
1287
switch (BaseTy->getKind ()) {
1289
1288
case TypeKind::BuiltinInteger: {
1290
1289
Encoding = llvm::dwarf::DW_ATE_unsigned;
1291
- SizeInBits = getSizeOfBasicType (DbgTy);
1290
+ if (auto CompletedDbgTy = CompletedDebugTypeInfo::get (DbgTy))
1291
+ SizeInBits = getSizeOfBasicType (*CompletedDbgTy);
1292
1292
break ;
1293
1293
}
1294
1294
1295
1295
case TypeKind::BuiltinIntegerLiteral: {
1296
1296
Encoding = llvm::dwarf::DW_ATE_unsigned; // ?
1297
- SizeInBits = getSizeOfBasicType (DbgTy);
1297
+ if (auto CompletedDbgTy = CompletedDebugTypeInfo::get (DbgTy))
1298
+ SizeInBits = getSizeOfBasicType (*CompletedDbgTy);
1298
1299
break ;
1299
1300
}
1300
1301
You can’t perform that action at this time.
0 commit comments