Fix array comparison

This commit is contained in:
Alexey Prokhin 2011-03-26 17:58:08 +03:00
parent 058e2df074
commit 375dcb095c
3 changed files with 4 additions and 2 deletions

View file

@ -1117,7 +1117,7 @@ LLValue* DtoArrayCompare(Loc& loc, TOK op, DValue* l, DValue* r)
if (t->ty == Tchar)
res = DtoArrayEqCmp_impl(loc, "_adCmpChar", l, r, false);
else
res = DtoArrayEqCmp_impl(loc, "_adCmp", l, r, true);
res = DtoArrayEqCmp_impl(loc, _adCmp, l, r, true);
res = gIR->ir->CreateICmp(cmpop, res, DtoConstInt(0), "tmp");
}

View file

@ -789,7 +789,7 @@ static void LLVM_D_BuildRuntimeModule()
// int _adCmp(void[] a1, void[] a2, TypeInfo ti)
{
llvm::StringRef fname(_adEq);
llvm::StringRef fname2("_adCmp");
llvm::StringRef fname2(_adCmp);
std::vector<const LLType*> types;
types.push_back(rt_array(byteTy));
types.push_back(rt_array(byteTy));

View file

@ -13,9 +13,11 @@ llvm::GlobalVariable* LLVM_D_GetRuntimeGlobal(llvm::Module* target, const char*
#if DMDV1
#define _d_allocclass "_d_allocclass"
#define _adEq "_adEq"
#define _adCmp "_adCmp"
#else
#define _d_allocclass "_d_newclass"
#define _adEq "_adEq2"
#define _adCmp "_adCmp2"
#endif
#endif // LDC_GEN_RUNTIME_H_