Mercurial > projects > ldc
comparison gen/classes.cpp @ 285:297690b5d4a5 trunk
[svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction.
author | lindquist |
---|---|
date | Sat, 21 Jun 2008 03:14:49 +0200 |
parents | 70c370e97944 |
children | a92ec67eabe7 |
comparison
equal
deleted
inserted
replaced
284:70c370e97944 | 285:297690b5d4a5 |
---|---|
1386 DtoForceDeclareDsymbol(dtor); | 1386 DtoForceDeclareDsymbol(dtor); |
1387 return llvm::ConstantExpr::getBitCast(dtor->ir.irFunc->func, getPtrToType(LLType::Int8Ty)); | 1387 return llvm::ConstantExpr::getBitCast(dtor->ir.irFunc->func, getPtrToType(LLType::Int8Ty)); |
1388 #endif | 1388 #endif |
1389 } | 1389 } |
1390 | 1390 |
1391 static uint build_classinfo_flags(ClassDeclaration* cd) | 1391 static unsigned build_classinfo_flags(ClassDeclaration* cd) |
1392 { | 1392 { |
1393 // adapted from original dmd code | 1393 // adapted from original dmd code |
1394 uint flags = 0; | 1394 unsigned flags = 0; |
1395 //flags |= isCOMclass(); // IUnknown | 1395 //flags |= isCOMclass(); // IUnknown |
1396 bool hasOffTi = false; | 1396 bool hasOffTi = false; |
1397 if (cd->ctor) flags |= 8; | 1397 if (cd->ctor) flags |= 8; |
1398 for (ClassDeclaration *cd2 = cd; cd2; cd2 = cd2->baseClass) | 1398 for (ClassDeclaration *cd2 = cd; cd2; cd2 = cd2->baseClass) |
1399 { | 1399 { |
1561 // uint flags | 1561 // uint flags |
1562 if (cd->isInterfaceDeclaration() || cd->isAbstract()) { | 1562 if (cd->isInterfaceDeclaration() || cd->isAbstract()) { |
1563 c = defc->getOperand(9); | 1563 c = defc->getOperand(9); |
1564 } | 1564 } |
1565 else { | 1565 else { |
1566 uint flags = build_classinfo_flags(cd); | 1566 unsigned flags = build_classinfo_flags(cd); |
1567 c = DtoConstUint(flags); | 1567 c = DtoConstUint(flags); |
1568 } | 1568 } |
1569 inits.push_back(c); | 1569 inits.push_back(c); |
1570 | 1570 |
1571 // deallocator | 1571 // deallocator |