mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Allow an opaque struct type to be specified as the struct
to perform struct-layout into. Swift SVN r1823
This commit is contained in:
@@ -76,12 +76,20 @@ IRGenModule::IRGenModule(ASTContext &Context,
|
||||
llvm::Type *funcElts[] = { Int8PtrTy, RefCountedPtrTy };
|
||||
FunctionPairTy = llvm::StructType::get(LLVMContext, funcElts,
|
||||
/*packed*/ false);
|
||||
|
||||
OpaqueStructTy = nullptr;
|
||||
}
|
||||
|
||||
IRGenModule::~IRGenModule() {
|
||||
delete &Types;
|
||||
}
|
||||
|
||||
llvm::StructType *IRGenModule::getOpaqueStructTy() {
|
||||
if (OpaqueStructTy) return OpaqueStructTy;
|
||||
OpaqueStructTy = llvm::StructType::create(LLVMContext);
|
||||
return OpaqueStructTy;
|
||||
}
|
||||
|
||||
llvm::Constant *IRGenModule::getAllocFn() {
|
||||
if (AllocFn) return AllocFn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user