//===--- GenStruct.h - Swift IR generation for structs ----------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file provides the private interface to the struct-emission code. // //===----------------------------------------------------------------------===// #ifndef SWIFT_IRGEN_GENSTRUCT_H #define SWIFT_IRGEN_GENSTRUCT_H namespace llvm { class Constant; } namespace swift { class CanType; class SILType; class VarDecl; namespace irgen { class Address; class Explosion; class IRGenFunction; class IRGenModule; Address projectPhysicalStructMemberAddress(IRGenFunction &IGF, Address base, SILType baseType, VarDecl *field); void projectPhysicalStructMemberFromExplosion(IRGenFunction &IGF, SILType baseType, Explosion &base, VarDecl *field, Explosion &out); /// Return the constant offset of the given stored property in a struct, /// or return nullptr if the field does not have fixed layout. llvm::Constant *emitPhysicalStructMemberFixedOffset(IRGenModule &IGM, SILType baseType, VarDecl *field); } // end namespace irgen } // end namespace swift #endif