Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 1403:e5c5d354c649

Show
Ignore:
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
  • gen/llvmhelpers.cpp

    r1356 r1403  
    13721372        if (fd->isArrayOp) 
    13731373            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; 
    13741379    } 
    13751380 
  • gen/main.cpp

    r1402 r1403  
    812812        if (!global.params.useArrayBounds && !global.params.useAssert) 
    813813        { 
    814 #endif 
    815814            // Do pass 3 semantic analysis on all imported modules, 
    816815            // since otherwise functions in them cannot be inlined 
     
    824823            if (global.errors) 
    825824                fatal(); 
    826 #if !IN_LLVM 
    827825        } 
    828826 
     
    835833        } 
    836834    } 
    837 #endif 
    838835    if (global.errors) 
    839836        fatal(); 
     837#endif 
    840838 
    841839    // write module dependencies to file if requested 
  • ir/irclass.cpp

    r1351 r1403  
    121121    name.append(cd->mangle()); 
    122122    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); 
    124126 
    125127    return classInterfacesArray; 
Copyright © 2008, LDC Development Team.