Mercurial > projects > ldc
diff gen/tollvm.cpp @ 1279:04c36605feb9
Fixed array operation codegen when used from imported templates. All array operations are now emitted with template linkage. Fixed #270 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Wed, 29 Apr 2009 18:59:39 +0200 |
parents | f1877b6be63d |
children | c74dfdcc5043 |
line wrap: on
line diff
--- a/gen/tollvm.cpp Wed Apr 29 18:39:59 2009 +0200 +++ b/gen/tollvm.cpp Wed Apr 29 18:59:39 2009 +0200 @@ -275,9 +275,9 @@ assert(fdecl->type->ty == Tfunction); TypeFunction* ft = (TypeFunction*)fdecl->type; - // array operations are always internal + // array operations are always template linkage if (fdecl->isArrayOp) - return llvm::GlobalValue::InternalLinkage; + return TEMPLATE_LINKAGE_TYPE; // intrinsics are always external if (fdecl->llvmInternal == LLVMintrinsic) return llvm::GlobalValue::ExternalLinkage;