File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 77
77
#include " swift/AST/PrettyStackTrace.h"
78
78
#include " swift/AST/SubstitutionMap.h"
79
79
#include " swift/AST/Types.h"
80
+ #include " clang/AST/ASTContext.h"
80
81
#include " clang/CodeGen/CodeGenABITypes.h"
81
82
#include " llvm/IR/Constants.h"
82
83
#include " llvm/IR/DerivedTypes.h"
@@ -1648,8 +1649,13 @@ void irgen::emitBlockHeader(IRGenFunction &IGF,
1648
1649
// Build the block descriptor.
1649
1650
ConstantInitBuilder builder (IGF.IGM );
1650
1651
auto descriptorFields = builder.beginStruct ();
1651
- descriptorFields.addInt (IGF.IGM .IntPtrTy , 0 );
1652
- descriptorFields.addInt (IGF.IGM .IntPtrTy ,
1652
+
1653
+ const clang::ASTContext &ASTContext = IGF.IGM .getClangASTContext ();
1654
+ llvm::IntegerType *UnsignedLongTy =
1655
+ llvm::IntegerType::get (IGF.IGM .LLVMContext ,
1656
+ ASTContext.getTypeSize (ASTContext.UnsignedLongTy ));
1657
+ descriptorFields.addInt (UnsignedLongTy, 0 );
1658
+ descriptorFields.addInt (UnsignedLongTy,
1653
1659
storageTL.getFixedSize ().getValue ());
1654
1660
1655
1661
if (!isPOD) {
You can’t perform that action at this time.
0 commit comments