mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Fix array comparison
This commit is contained in:
parent
058e2df074
commit
375dcb095c
3 changed files with 4 additions and 2 deletions
|
@ -1117,7 +1117,7 @@ LLValue* DtoArrayCompare(Loc& loc, TOK op, DValue* l, DValue* r)
|
||||||
if (t->ty == Tchar)
|
if (t->ty == Tchar)
|
||||||
res = DtoArrayEqCmp_impl(loc, "_adCmpChar", l, r, false);
|
res = DtoArrayEqCmp_impl(loc, "_adCmpChar", l, r, false);
|
||||||
else
|
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");
|
res = gIR->ir->CreateICmp(cmpop, res, DtoConstInt(0), "tmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -789,7 +789,7 @@ static void LLVM_D_BuildRuntimeModule()
|
||||||
// int _adCmp(void[] a1, void[] a2, TypeInfo ti)
|
// int _adCmp(void[] a1, void[] a2, TypeInfo ti)
|
||||||
{
|
{
|
||||||
llvm::StringRef fname(_adEq);
|
llvm::StringRef fname(_adEq);
|
||||||
llvm::StringRef fname2("_adCmp");
|
llvm::StringRef fname2(_adCmp);
|
||||||
std::vector<const LLType*> types;
|
std::vector<const LLType*> types;
|
||||||
types.push_back(rt_array(byteTy));
|
types.push_back(rt_array(byteTy));
|
||||||
types.push_back(rt_array(byteTy));
|
types.push_back(rt_array(byteTy));
|
||||||
|
|
|
@ -13,9 +13,11 @@ llvm::GlobalVariable* LLVM_D_GetRuntimeGlobal(llvm::Module* target, const char*
|
||||||
#if DMDV1
|
#if DMDV1
|
||||||
#define _d_allocclass "_d_allocclass"
|
#define _d_allocclass "_d_allocclass"
|
||||||
#define _adEq "_adEq"
|
#define _adEq "_adEq"
|
||||||
|
#define _adCmp "_adCmp"
|
||||||
#else
|
#else
|
||||||
#define _d_allocclass "_d_newclass"
|
#define _d_allocclass "_d_newclass"
|
||||||
#define _adEq "_adEq2"
|
#define _adEq "_adEq2"
|
||||||
|
#define _adCmp "_adCmp2"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // LDC_GEN_RUNTIME_H_
|
#endif // LDC_GEN_RUNTIME_H_
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue