mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 22:48:43 +03:00
Fixed some unmerged parts of the D2 frontend.
Removed the automatic linker flags for D2 (temp). Renamed a runtime function for D2.
This commit is contained in:
parent
5658d9bb38
commit
1812c5b00a
3 changed files with 20 additions and 6 deletions
|
@ -8746,8 +8746,11 @@ Expression *ShlAssignExp::semantic(Scope *sc)
|
||||||
typeCombine(sc);
|
typeCombine(sc);
|
||||||
e1->checkIntegral();
|
e1->checkIntegral();
|
||||||
e2 = e2->checkIntegral();
|
e2 = e2->checkIntegral();
|
||||||
//e2 = e2->castTo(sc, Type::tshiftcnt);
|
#if IN_DMD
|
||||||
e2 = e2->castTo(sc, e1->type); // LDC
|
e2 = e2->castTo(sc, Type::tshiftcnt);
|
||||||
|
#elif IN_LLVM
|
||||||
|
e2 = e2->castTo(sc, e1->type);
|
||||||
|
#endif
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8775,8 +8778,11 @@ Expression *ShrAssignExp::semantic(Scope *sc)
|
||||||
typeCombine(sc);
|
typeCombine(sc);
|
||||||
e1->checkIntegral();
|
e1->checkIntegral();
|
||||||
e2 = e2->checkIntegral();
|
e2 = e2->checkIntegral();
|
||||||
//e2 = e2->castTo(sc, Type::tshiftcnt);
|
#if IN_DMD
|
||||||
e2 = e2->castTo(sc, e1->type); // LDC
|
e2 = e2->castTo(sc, Type::tshiftcnt);
|
||||||
|
#elif IN_LLVM
|
||||||
|
e2 = e2->castTo(sc, e1->type);
|
||||||
|
#endif
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9343,7 +9349,8 @@ Expression *ShrExp::semantic(Scope *sc)
|
||||||
e1 = e1->checkIntegral();
|
e1 = e1->checkIntegral();
|
||||||
e2 = e2->checkIntegral();
|
e2 = e2->checkIntegral();
|
||||||
e1 = e1->integralPromotions(sc);
|
e1 = e1->integralPromotions(sc);
|
||||||
e2 = e2->castTo(sc, Type::tshiftcnt);
|
//e2 = e2->castTo(sc, Type::tshiftcnt);
|
||||||
|
e2 = e2->castTo(sc, e1->type); // LDC
|
||||||
type = e1->type;
|
type = e1->type;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
@ -9367,7 +9374,8 @@ Expression *UshrExp::semantic(Scope *sc)
|
||||||
e1 = e1->checkIntegral();
|
e1 = e1->checkIntegral();
|
||||||
e2 = e2->checkIntegral();
|
e2 = e2->checkIntegral();
|
||||||
e1 = e1->integralPromotions(sc);
|
e1 = e1->integralPromotions(sc);
|
||||||
e2 = e2->castTo(sc, Type::tshiftcnt);
|
//e2 = e2->castTo(sc, Type::tshiftcnt);
|
||||||
|
e2 = e2->castTo(sc, e1->type); // LDC
|
||||||
type = e1->type;
|
type = e1->type;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -311,12 +311,14 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
else if (!noDefaultLib)
|
else if (!noDefaultLib)
|
||||||
{
|
{
|
||||||
|
#if !DMDV2
|
||||||
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
|
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
|
||||||
global.params.linkswitches->push(mem.strdup("-ltango-cc-tango"));
|
global.params.linkswitches->push(mem.strdup("-ltango-cc-tango"));
|
||||||
global.params.linkswitches->push(mem.strdup("-ltango-gc-basic"));
|
global.params.linkswitches->push(mem.strdup("-ltango-gc-basic"));
|
||||||
// pass the runtime again to resolve issues
|
// pass the runtime again to resolve issues
|
||||||
// with linking order
|
// with linking order
|
||||||
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
|
global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.params.run)
|
if (global.params.run)
|
||||||
|
|
|
@ -328,7 +328,11 @@ static void LLVM_D_BuildRuntimeModule()
|
||||||
|
|
||||||
// Object _d_allocclass(ClassInfo ci)
|
// Object _d_allocclass(ClassInfo ci)
|
||||||
{
|
{
|
||||||
|
#if DMDV2
|
||||||
|
std::string fname("_d_newclass");
|
||||||
|
#else
|
||||||
std::string fname("_d_allocclass");
|
std::string fname("_d_allocclass");
|
||||||
|
#endif
|
||||||
std::vector<const LLType*> types;
|
std::vector<const LLType*> types;
|
||||||
types.push_back(classInfoTy);
|
types.push_back(classInfoTy);
|
||||||
const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
|
const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue