Changeset 1279:04c36605feb9
- Timestamp:
- 04/29/09 12:59:39
(3 years ago)
- Author:
- Tomas Lindquist Olsen <tomas.l.olsen gmail com>
- branch:
- default
- Message:
Fixed array operation codegen when used from imported templates. All array operations are now emitted with template linkage. Fixed #270 .
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1103 |
r1279 |
|
| 276 | 276 | fd = new FuncDeclaration(0, 0, Lexer::idPool(name), STCundefined, ftype); |
|---|
| 277 | 277 | fd->fbody = fbody; |
|---|
| 278 | | fd->protection = PROTprotected; |
|---|
| | 278 | fd->protection = PROTpublic; |
|---|
| 279 | 279 | fd->linkage = LINKd; |
|---|
| 280 | 280 | |
|---|
| r1278 |
r1279 |
|
| 1353 | 1353 | bool mustDefineSymbol(Dsymbol* s) |
|---|
| 1354 | 1354 | { |
|---|
| | 1355 | if (FuncDeclaration* fd = s->isFuncDeclaration()) |
|---|
| | 1356 | { |
|---|
| | 1357 | if (fd->isArrayOp) |
|---|
| | 1358 | return true; |
|---|
| | 1359 | } |
|---|
| | 1360 | |
|---|
| 1355 | 1361 | TemplateInstance* tinst = DtoIsTemplateInstance(s); |
|---|
| 1356 | 1362 | if (tinst) |
|---|
| r1242 |
r1279 |
|
| 276 | 276 | TypeFunction* ft = (TypeFunction*)fdecl->type; |
|---|
| 277 | 277 | |
|---|
| 278 | | // array operations are always internal |
|---|
| | 278 | // array operations are always template linkage |
|---|
| 279 | 279 | if (fdecl->isArrayOp) |
|---|
| 280 | | return llvm::GlobalValue::InternalLinkage; |
|---|
| | 280 | return TEMPLATE_LINKAGE_TYPE; |
|---|
| 281 | 281 | // intrinsics are always external |
|---|
| 282 | 282 | if (fdecl->llvmInternal == LLVMintrinsic) |
|---|