Permalink
Browse files

Fix array comparison

  • Loading branch information...
1 parent 058e2df commit 375dcb095c3b2fb0fa91f12d918940d90fe4bc3b @AlexeyProkhin AlexeyProkhin committed Mar 26, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −1 gen/arrays.cpp
  2. +1 −1 gen/runtime.cpp
  3. +2 −0 gen/runtime.h
View
@@ -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
@@ -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
@@ -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_

0 comments on commit 375dcb0

Please sign in to comment.