Changeset 1419:a6dfd3cb5b99
- Timestamp:
- 05/27/09 13:20:18
(3 years ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- Children:
1420:3a31fc913db7 1421:7a693c367190
- Tags:
0.9.1
- branch:
- default
- Message:
Error instead of assert on delegate literals as constant expressions.
Make function literal linkage internal inside functions and external otherwise.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1401 |
r1419 |
|
| 2298 | 2298 | |
|---|
| 2299 | 2299 | assert(fd); |
|---|
| 2300 | | assert(fd->tok == TOKfunction); |
|---|
| | 2300 | if (fd->tok != TOKfunction) |
|---|
| | 2301 | { |
|---|
| | 2302 | assert(fd->tok == TOKdelegate); |
|---|
| | 2303 | error("delegate literals as constant expressions are not yet allowed"); |
|---|
| | 2304 | } |
|---|
| 2301 | 2305 | |
|---|
| 2302 | 2306 | fd->codegen(Type::sir); |
|---|
| r1375 |
r1419 |
|
| 266 | 266 | else if (ft->linkage == LINKc) |
|---|
| 267 | 267 | return llvm::GlobalValue::ExternalLinkage; |
|---|
| 268 | | // Function & delegate literals, foreach bodies and lazy parameters: internal linkage |
|---|
| 269 | | else if (fdecl->isFuncLiteralDeclaration()) |
|---|
| 270 | | return llvm::GlobalValue::InternalLinkage; |
|---|
| 271 | 268 | } |
|---|
| 272 | 269 | // class |
|---|