Changeset 1403:e5c5d354c649
- Timestamp:
- 05/21/09 04:56:04
(3 years ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- branch:
- default
- Message:
Tentative fix for semantic3 on imported modules and unnecessary template
function definition issue. Please test!
Also change linkage of interfaceInfos to external (same as Class, vtbl,
init). The other change might make this superfluous.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1356 |
r1403 |
|
| 1372 | 1372 | if (fd->isArrayOp) |
|---|
| 1373 | 1373 | return true; |
|---|
| | 1374 | |
|---|
| | 1375 | // we can't (and probably shouldn't?) define functions |
|---|
| | 1376 | // that weren't semantic3'ed |
|---|
| | 1377 | if (fd->semanticRun < 4) |
|---|
| | 1378 | return false; |
|---|
| 1374 | 1379 | } |
|---|
| 1375 | 1380 | |
|---|
| r1402 |
r1403 |
|
| 812 | 812 | if (!global.params.useArrayBounds && !global.params.useAssert) |
|---|
| 813 | 813 | { |
|---|
| 814 | | #endif |
|---|
| 815 | 814 | // Do pass 3 semantic analysis on all imported modules, |
|---|
| 816 | 815 | // since otherwise functions in them cannot be inlined |
|---|
| … | … | |
| 824 | 823 | if (global.errors) |
|---|
| 825 | 824 | fatal(); |
|---|
| 826 | | #if !IN_LLVM |
|---|
| 827 | 825 | } |
|---|
| 828 | 826 | |
|---|
| … | … | |
| 835 | 833 | } |
|---|
| 836 | 834 | } |
|---|
| 837 | | #endif |
|---|
| 838 | 835 | if (global.errors) |
|---|
| 839 | 836 | fatal(); |
|---|
| | 837 | #endif |
|---|
| 840 | 838 | |
|---|
| 841 | 839 | // write module dependencies to file if requested |
|---|
| r1351 |
r1403 |
|
| 121 | 121 | name.append(cd->mangle()); |
|---|
| 122 | 122 | name.append("16__interfaceInfosZ"); |
|---|
| 123 | | classInterfacesArray = new llvm::GlobalVariable(array_type, true, DtoLinkage(cd), NULL, name, classInfo); |
|---|
| | 123 | |
|---|
| | 124 | llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(aggrdecl); |
|---|
| | 125 | classInterfacesArray = new llvm::GlobalVariable(array_type, true, _linkage, NULL, name, classInfo); |
|---|
| 124 | 126 | |
|---|
| 125 | 127 | return classInterfacesArray; |
|---|