mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 04:15:58 +03:00
Merge 2.072.2 front-end
The part needing most attention was ddmd.root.ctfloat, ddmd.target (incl. gen/target.cpp) and ddmd.builtin. The front-end is now prepared for elaborate compile-time floating-point types to allow for proper cross- compilation. This version still uses the host's `real` type for compile-time reals, except for MSVC hosts, which still use 64-bit doubles (when compiled with DMD host compiler too). Some other changes: * semantic*() of Statements extracted from statement.d to statementsem.d * mangle() -> mangleToBuffer() * Identifier::string -> toChars() * Token::float80value => floatvalue * Dsymbol::isAggregateMember() => isMember() * BoolExp is no more * ddmd.root.ctfloat: LDC-specific CTFE builtins
This commit is contained in:
parent
a89719d7bd
commit
dca21939e1
152 changed files with 15159 additions and 11033 deletions
|
@ -83,13 +83,14 @@ void RTTIBuilder::push_void_array(uint64_t dim, llvm::Constant *ptr) {
|
|||
|
||||
void RTTIBuilder::push_void_array(llvm::Constant *CI, Type *valtype,
|
||||
Dsymbol *mangle_sym) {
|
||||
std::string initname(mangle(mangle_sym));
|
||||
initname.append(".rtti.voidarr.data");
|
||||
OutBuffer initname;
|
||||
mangleToBuffer(mangle_sym, &initname);
|
||||
initname.writestring(".rtti.voidarr.data");
|
||||
|
||||
const LinkageWithCOMDAT lwc(TYPEINFO_LINKAGE_TYPE, supportsCOMDAT());
|
||||
|
||||
auto G = new LLGlobalVariable(gIR->module, CI->getType(), true,
|
||||
lwc.first, CI, initname);
|
||||
lwc.first, CI, initname.peekString());
|
||||
setLinkage(lwc, G);
|
||||
G->setAlignment(DtoAlignment(valtype));
|
||||
|
||||
|
@ -103,15 +104,19 @@ void RTTIBuilder::push_array(llvm::Constant *CI, uint64_t dim, Type *valtype,
|
|||
tmpStr.erase(remove(tmpStr.begin(), tmpStr.end(), ']'), tmpStr.end());
|
||||
tmpStr.append("arr");
|
||||
|
||||
std::string initname(mangle_sym ? mangle(mangle_sym) : ".ldc");
|
||||
initname.append(".rtti.");
|
||||
initname.append(tmpStr);
|
||||
initname.append(".data");
|
||||
OutBuffer initname;
|
||||
if (mangle_sym)
|
||||
mangleToBuffer(mangle_sym, &initname);
|
||||
else
|
||||
initname.writestring(".ldc");
|
||||
initname.writestring(".rtti.");
|
||||
initname.writestring(tmpStr.c_str());
|
||||
initname.writestring(".data");
|
||||
|
||||
const LinkageWithCOMDAT lwc(TYPEINFO_LINKAGE_TYPE, supportsCOMDAT());
|
||||
|
||||
auto G = new LLGlobalVariable(gIR->module, CI->getType(), true,
|
||||
lwc.first, CI, initname);
|
||||
lwc.first, CI, initname.peekString());
|
||||
setLinkage(lwc, G);
|
||||
G->setAlignment(DtoAlignment(valtype));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue