File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1557,8 +1557,12 @@ convertPrimitiveBuiltin(IRGenModule &IGM, CanType canTy) {
1557
1557
return RetTy{ llvm::Type::getFloatTy (ctx), Size (4 ), Alignment (4 ) };
1558
1558
case BuiltinFloatType::IEEE64:
1559
1559
return RetTy{ llvm::Type::getDoubleTy (ctx), Size (8 ), Alignment (8 ) };
1560
- case BuiltinFloatType::IEEE80:
1561
- return RetTy{ llvm::Type::getX86_FP80Ty (ctx), Size (16 ), Alignment (16 ) };
1560
+ case BuiltinFloatType::IEEE80: {
1561
+ llvm::Type *floatTy = llvm::Type::getX86_FP80Ty (ctx);
1562
+ uint64_t ByteSize = IGM.DataLayout .getTypeAllocSize (floatTy);
1563
+ unsigned align = IGM.DataLayout .getABITypeAlignment (floatTy);
1564
+ return RetTy{ floatTy, Size (ByteSize), Alignment (align) };
1565
+ }
1562
1566
case BuiltinFloatType::IEEE128:
1563
1567
return RetTy{ llvm::Type::getFP128Ty (ctx), Size (16 ), Alignment (16 ) };
1564
1568
case BuiltinFloatType::PPC128:
You can’t perform that action at this time.
0 commit comments