mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-13 11:23:14 +01:00
This not only reduces code duplication, but the unification also enables code a la StructLiteralExp to handle classes (for CTFE class constant support in 2.063).
30 lines
813 B
C++
30 lines
813 B
C++
//===-- irtypeaggr.cpp ----------------------------------------------------===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
#include "ir/irtypeaggr.h"
|
||
|
||
#if LDC_LLVM_VER >= 303
|
||
#include "llvm/IR/DerivedTypes.h"
|
||
#else
|
||
#include "llvm/DerivedTypes.h"
|
||
#endif
|
||
|
||
#include "aggregate.h"
|
||
|
||
#include "gen/irstate.h"
|
||
|
||
//////////////////////////////////////////////////////////////////////////////
|
||
//////////////////////////////////////////////////////////////////////////////
|
||
|
||
IrTypeAggr::IrTypeAggr(AggregateDeclaration * ad)
|
||
: IrType(ad->type, LLStructType::create(gIR->context(), ad->toPrettyChars())),
|
||
aggr(ad)
|
||
{
|
||
}
|