Merge branch 'master' into merge-2.061-2

Conflicts:
	gen/runtime.cpp
This commit is contained in:
kai 2013-01-27 00:20:21 +01:00
commit a3fcdafd1f
2 changed files with 112 additions and 120 deletions

View file

@ -311,7 +311,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_assert( char[] file, uint line )
{
llvm::StringRef fname("_d_assert");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(stringTy);
types.push_back(intTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
@ -327,7 +327,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_array_bounds");
llvm::StringRef fname2("_d_switch_error");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
#if DMDV2
types.push_back(getPtrToType(DtoType(Module::moduleinfo->type)));
#else
@ -342,7 +342,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_assert_msg( char[] msg, char[] file, uint line )
{
llvm::StringRef fname("_d_assert_msg");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(stringTy);
types.push_back(stringTy);
types.push_back(intTy);
@ -358,7 +358,7 @@ static void LLVM_D_BuildRuntimeModule()
// void* _d_allocmemory(size_t sz)
{
llvm::StringRef fname("_d_allocmemory");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -368,7 +368,7 @@ static void LLVM_D_BuildRuntimeModule()
// void* _d_allocmemoryT(TypeInfo ti)
{
llvm::StringRef fname("_d_allocmemoryT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(typeInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -382,7 +382,7 @@ static void LLVM_D_BuildRuntimeModule()
llvm::StringRef fname("_d_newarrayT");
llvm::StringRef fname2("_d_newarrayiT");
llvm::StringRef fname3("_d_newarrayvT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(typeInfoTy);
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
@ -400,7 +400,7 @@ static void LLVM_D_BuildRuntimeModule()
llvm::StringRef fname("_d_newarraymT");
llvm::StringRef fname2("_d_newarraymiT");
llvm::StringRef fname3("_d_newarraymvT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(sizeTy);
types.push_back(rt_ptr(sizeTy));
@ -418,7 +418,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_newarrayT");
llvm::StringRef fname2("_d_newarrayiT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(typeInfoTy);
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(voidArrayTy, types, false);
@ -430,7 +430,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_newarraymT");
llvm::StringRef fname2("_d_newarraymiT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(typeInfoTy);
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(voidArrayTy, types, true);
@ -448,7 +448,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_arraysetlengthT");
llvm::StringRef fname2("_d_arraysetlengthiT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 4> types;
types.push_back(typeInfoTy);
types.push_back(sizeTy);
#if DMDV2
@ -467,7 +467,7 @@ static void LLVM_D_BuildRuntimeModule()
// byte[] _d_arrayappendcTX(TypeInfo ti, ref byte[] px, size_t n)
{
llvm::StringRef fname("_d_arrayappendcTX");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(voidArrayPtrTy);
types.push_back(sizeTy);
@ -477,7 +477,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _d_arrayappendT(TypeInfo ti, byte[]* px, byte[] y)
{
llvm::StringRef fname("_d_arrayappendT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(voidArrayPtrTy);
types.push_back(voidArrayTy);
@ -487,7 +487,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _d_arrayappendcd(ref char[] x, dchar c)
{
llvm::StringRef fname("_d_arrayappendcd");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(getPtrToType(stringTy));
types.push_back(intTy);
LLFunctionType* fty = llvm::FunctionType::get(voidArrayTy, types, false);
@ -496,7 +496,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _d_arrayappendwd(ref wchar[] x, dchar c)
{
llvm::StringRef fname("_d_arrayappendwd");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(getPtrToType(wstringTy));
types.push_back(intTy);
LLFunctionType* fty = llvm::FunctionType::get(voidArrayTy, types, false);
@ -505,7 +505,7 @@ static void LLVM_D_BuildRuntimeModule()
// byte[] _d_arraycatT(TypeInfo ti, byte[] x, byte[] y)
{
llvm::StringRef fname("_d_arraycatT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(voidArrayTy);
types.push_back(voidArrayTy);
@ -515,7 +515,7 @@ static void LLVM_D_BuildRuntimeModule()
// byte[] _d_arraycatnT(TypeInfo ti, uint n, ...)
{
llvm::StringRef fname("_d_arraycatnT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(typeInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(voidArrayTy, types, true);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -524,7 +524,7 @@ static void LLVM_D_BuildRuntimeModule()
// byte[] _d_arrayappendcT(TypeInfo ti, void* array, void* element)
{
llvm::StringRef fname("_d_arrayappendcT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(voidPtrTy);
types.push_back(voidPtrTy);
@ -536,7 +536,7 @@ static void LLVM_D_BuildRuntimeModule()
// Object _d_allocclass(ClassInfo ci)
{
llvm::StringRef fname(_d_allocclass);
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(classInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -548,7 +548,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_delarray_t(Array *p, TypeInfo ti)
{
llvm::StringRef fname("_d_delarray_t");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(voidArrayPtrTy);
types.push_back(typeInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
@ -560,7 +560,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_delarray(size_t plength, void* pdata)
{
llvm::StringRef fname("_d_delarray");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(sizeTy);
types.push_back(voidPtrTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
@ -581,7 +581,7 @@ static void LLVM_D_BuildRuntimeModule()
llvm::StringRef fname("_d_delmemory");
llvm::StringRef fname2("_d_delinterface");
llvm::StringRef fname3("_d_callfinalizer");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(voidPtrTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -593,7 +593,7 @@ static void LLVM_D_BuildRuntimeModule()
// D2: void _d_delclass(Object* p)
{
llvm::StringRef fname("_d_delclass");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
#if DMDV2
types.push_back(rt_ptr(objectTy));
#else
@ -611,7 +611,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_array_slice_copy(void* dst, size_t dstlen, void* src, size_t srclen)
{
llvm::StringRef fname("_d_array_slice_copy");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 4> types;
types.push_back(voidPtrTy);
types.push_back(sizeTy);
types.push_back(voidPtrTy);
@ -630,7 +630,7 @@ static void LLVM_D_BuildRuntimeModule()
{ \
llvm::StringRef fname(a); \
llvm::StringRef fname2(b); \
std::vector<LLType*> types; \
llvm::SmallVector<LLType*, 2> types; \
types.push_back(TY); \
types.push_back(rt_dg1()); \
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false); \
@ -647,7 +647,7 @@ static void LLVM_D_BuildRuntimeModule()
{ \
llvm::StringRef fname(a); \
llvm::StringRef fname2(b); \
std::vector<LLType*> types; \
llvm::SmallVector<LLType*, 2> types; \
types.push_back(TY); \
types.push_back(rt_dg2()); \
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false); \
@ -663,7 +663,7 @@ static void LLVM_D_BuildRuntimeModule()
{ \
llvm::StringRef fname(a); \
llvm::StringRef fname2(b); \
std::vector<LLType*> types; \
llvm::SmallVector<LLType*, 2> types; \
types.push_back(TY); \
types.push_back(rt_dg1()); \
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false); \
@ -679,7 +679,7 @@ static void LLVM_D_BuildRuntimeModule()
{ \
llvm::StringRef fname(a); \
llvm::StringRef fname2(b); \
std::vector<LLType*> types; \
llvm::SmallVector<LLType*, 2> types; \
types.push_back(TY); \
types.push_back(rt_dg2()); \
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false); \
@ -699,7 +699,7 @@ static void LLVM_D_BuildRuntimeModule()
// size_t _d_array_cast_len(size_t len, size_t elemsz, size_t newelemsz)
{
llvm::StringRef fname("_d_array_cast_len");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(sizeTy);
types.push_back(sizeTy);
types.push_back(sizeTy);
@ -719,7 +719,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_arrayassign");
llvm::StringRef fname2("_d_arrayctor");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(voidArrayTy);
types.push_back(voidArrayTy);
@ -733,7 +733,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_arraysetassign");
llvm::StringRef fname2("_d_arraysetctor");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 4> types;
types.push_back(voidPtrTy);
types.push_back(voidPtrTy);
types.push_back(sizeTy);
@ -755,7 +755,7 @@ static void LLVM_D_BuildRuntimeModule()
// Object _d_toObject(void* p)
{
llvm::StringRef fname("_d_toObject");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(voidPtrTy);
LLFunctionType* fty = llvm::FunctionType::get(objectTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -766,7 +766,7 @@ static void LLVM_D_BuildRuntimeModule()
// Object _d_interface_cast(void* p, ClassInfo c)
{
llvm::StringRef fname("_d_interface_cast");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(voidPtrTy);
types.push_back(classInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(objectTy, types, false);
@ -778,7 +778,7 @@ static void LLVM_D_BuildRuntimeModule()
// Object _d_dynamic_cast(Object o, ClassInfo c)
{
llvm::StringRef fname("_d_dynamic_cast");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(objectTy);
types.push_back(classInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(objectTy, types, false);
@ -795,7 +795,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_adReverseChar");
llvm::StringRef fname2("_adSortChar");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(stringTy);
LLFunctionType* fty = llvm::FunctionType::get(stringTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -807,7 +807,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_adReverseWchar");
llvm::StringRef fname2("_adSortWchar");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(wstringTy);
LLFunctionType* fty = llvm::FunctionType::get(wstringTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -817,7 +817,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _adReverse(void[] a, size_t szelem)
{
llvm::StringRef fname("_adReverse");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(byteTy));
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(rt_array(byteTy), types, false);
@ -828,7 +828,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _adDupT(TypeInfo ti, void[] a)
{
llvm::StringRef fname("_adDupT");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(typeInfoTy);
types.push_back(rt_array(byteTy));
LLFunctionType* fty = llvm::FunctionType::get(rt_array(byteTy), types, false);
@ -840,7 +840,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname(_adEq);
llvm::StringRef fname2(_adCmp);
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(rt_array(byteTy));
types.push_back(rt_array(byteTy));
types.push_back(typeInfoTy);
@ -854,7 +854,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _adCmpChar(void[] a1, void[] a2)
{
llvm::StringRef fname("_adCmpChar");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(byteTy));
types.push_back(rt_array(byteTy));
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false);
@ -865,7 +865,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _adSort(void[] a, TypeInfo ti)
{
llvm::StringRef fname("_adSort");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(byteTy));
types.push_back(typeInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(rt_array(byteTy), types, false);
@ -879,7 +879,7 @@ static void LLVM_D_BuildRuntimeModule()
// size_t _aaLen(AA aa)
{
llvm::StringRef fname("_aaLen");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(aaTy);
LLFunctionType* fty = llvm::FunctionType::get(sizeTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -896,7 +896,7 @@ static void LLVM_D_BuildRuntimeModule()
#else
llvm::StringRef fname("_aaGet");
#endif
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 4> types;
types.push_back(aaTy);
types.push_back(typeInfoTy);
types.push_back(sizeTy);
@ -916,7 +916,7 @@ static void LLVM_D_BuildRuntimeModule()
#else
llvm::StringRef fname("_aaIn");
#endif
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(typeInfoTy);
types.push_back(voidPtrTy);
@ -937,7 +937,7 @@ static void LLVM_D_BuildRuntimeModule()
llvm::StringRef fname("_aaDel");
LLType *retType = voidTy;
#endif
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(typeInfoTy);
types.push_back(voidPtrTy);
@ -949,7 +949,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _aaValues(AA aa, size_t keysize, size_t valuesize)
{
llvm::StringRef fname("_aaValues");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(sizeTy);
types.push_back(sizeTy);
@ -961,7 +961,7 @@ static void LLVM_D_BuildRuntimeModule()
// void* _aaRehash(AA* paa, TypeInfo keyti)
{
llvm::StringRef fname("_aaRehash");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(aaTy);
types.push_back(typeInfoTy);
LLFunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
@ -971,7 +971,7 @@ static void LLVM_D_BuildRuntimeModule()
// void[] _aaKeys(AA aa, size_t keysize)
{
llvm::StringRef fname("_aaKeys");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(aaTy);
types.push_back(sizeTy);
LLFunctionType* fty = llvm::FunctionType::get(rt_array(byteTy), types, false);
@ -982,7 +982,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _aaApply(AA aa, size_t keysize, dg_t dg)
{
llvm::StringRef fname("_aaApply");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(sizeTy);
types.push_back(rt_dg1());
@ -994,7 +994,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _aaApply2(AA aa, size_t keysize, dg2_t dg)
{
llvm::StringRef fname("_aaApply2");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(sizeTy);
types.push_back(rt_dg2());
@ -1007,7 +1007,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _aaEqual(TypeInfo_AssociativeArray ti, AA e1, AA e2)
{
llvm::StringRef fname("_aaEqual");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(typeInfoTy);
types.push_back(aaTy);
types.push_back(aaTy);
@ -1018,7 +1018,7 @@ static void LLVM_D_BuildRuntimeModule()
// BB* _d_assocarrayliteralTX(TypeInfo_AssociativeArray ti, void[] keys, void[] values)
{
llvm::StringRef fname("_d_assocarrayliteralTX");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTypeInfoTy);
types.push_back(voidArrayTy);
types.push_back(voidArrayTy);
@ -1029,7 +1029,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _aaEq(AA aa, AA ab, TypeInfo_AssociativeArray ti)
{
llvm::StringRef fname("_aaEq");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 3> types;
types.push_back(aaTy);
types.push_back(aaTy);
types.push_back(typeInfoTy);
@ -1048,8 +1048,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_moduleCtor");
llvm::StringRef fname2("_moduleDtor");
std::vector<LLType*> types;
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname2, M);
}
@ -1061,7 +1060,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_throw_exception(Object e)
{
llvm::StringRef fname("_d_throw_exception");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(objectTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -1074,7 +1073,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _d_switch_string(char[][] table, char[] ca)
{
llvm::StringRef fname("_d_switch_string");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(stringTy));
types.push_back(stringTy);
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false);
@ -1085,7 +1084,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _d_switch_ustring(wchar[][] table, wchar[] ca)
{
llvm::StringRef fname("_d_switch_ustring");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(wstringTy));
types.push_back(wstringTy);
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false);
@ -1096,7 +1095,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _d_switch_dstring(dchar[][] table, dchar[] ca)
{
llvm::StringRef fname("_d_switch_dstring");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 2> types;
types.push_back(rt_array(dstringTy));
types.push_back(dstringTy);
LLFunctionType* fty = llvm::FunctionType::get(intTy, types, false);
@ -1113,7 +1112,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_criticalenter");
llvm::StringRef fname2("_d_criticalexit");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(rt_ptr(DtoMutexType()));
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -1125,7 +1124,7 @@ static void LLVM_D_BuildRuntimeModule()
{
llvm::StringRef fname("_d_monitorenter");
llvm::StringRef fname2("_d_monitorexit");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(objectTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M)
@ -1141,7 +1140,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _d_eh_personality(int ver, int actions, ulong eh_class, ptr eh_info, ptr context)
{
llvm::StringRef fname("_d_eh_personality");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 5> types;
types.push_back(intTy);
types.push_back(intTy);
types.push_back(longTy);
@ -1154,7 +1153,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_eh_resume_unwind(ptr exc_struct)
{
llvm::StringRef fname("_d_eh_resume_unwind");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(voidPtrTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);
@ -1167,7 +1166,7 @@ static void LLVM_D_BuildRuntimeModule()
// void _d_invariant(Object o)
{
llvm::StringRef fname("_d_invariant");
std::vector<LLType*> types;
llvm::SmallVector<LLType*, 1> types;
types.push_back(objectTy);
LLFunctionType* fty = llvm::FunctionType::get(voidTy, types, false);
llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M);