Mercurial > projects > ldc
comparison gen/tollvm.cpp @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | 5825d48b27d1 |
children | 44a95ac7368a |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
132 { | 132 { |
133 return llvm::PointerType::get((*i)->recty.get()); | 133 return llvm::PointerType::get((*i)->recty.get()); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 Logger::println("no type found"); | |
137 } | 138 } |
138 | 139 |
139 TypeClass* tc = (TypeClass*)t; | 140 TypeClass* tc = (TypeClass*)t; |
140 assert(tc->sym); | 141 assert(tc->sym); |
141 DtoResolveDsymbol(tc->sym); | 142 DtoResolveDsymbol(tc->sym); |
347 llvm::GlobalValue::LinkageTypes DtoLinkage(PROT prot, uint stc) | 348 llvm::GlobalValue::LinkageTypes DtoLinkage(PROT prot, uint stc) |
348 { | 349 { |
349 switch(prot) | 350 switch(prot) |
350 { | 351 { |
351 case PROTprivate: | 352 case PROTprivate: |
352 return llvm::GlobalValue::InternalLinkage; | 353 if (stc & STCextern) |
354 return llvm::GlobalValue::ExternalLinkage; | |
355 else | |
356 return llvm::GlobalValue::InternalLinkage; | |
353 | 357 |
354 case PROTpublic: | 358 case PROTpublic: |
355 case PROTpackage: | 359 case PROTpackage: |
356 case PROTprotected: | 360 case PROTprotected: |
357 case PROTexport: | 361 case PROTexport: |
901 DtoStaticArrayCopy(lhs->getLVal(), rhs->getRVal()); | 905 DtoStaticArrayCopy(lhs->getLVal(), rhs->getRVal()); |
902 } | 906 } |
903 else if (t->ty == Tdelegate) { | 907 else if (t->ty == Tdelegate) { |
904 if (rhs->isNull()) | 908 if (rhs->isNull()) |
905 DtoNullDelegate(lhs->getLVal()); | 909 DtoNullDelegate(lhs->getLVal()); |
906 else if (!rhs->inPlace()) | 910 else if (!rhs->inPlace()) { |
907 DtoDelegateCopy(lhs->getLVal(), rhs->getRVal()); | 911 llvm::Value* l = lhs->getLVal(); |
912 llvm::Value* r = rhs->getRVal(); | |
913 Logger::cout() << "assign\nlhs: " << *l << "rhs: " << *r << '\n'; | |
914 DtoDelegateCopy(l, r); | |
915 } | |
908 } | 916 } |
909 else if (t->ty == Tclass) { | 917 else if (t->ty == Tclass) { |
910 assert(t2->ty == Tclass); | 918 assert(t2->ty == Tclass); |
911 // assignment to this in constructor special case | 919 // assignment to this in constructor special case |
912 if (lhs->isThis()) { | 920 if (lhs->isThis()) { |