mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 10:57:35 +03:00
Fix little C++ header regressions
This commit is contained in:
parent
879c8ba465
commit
c0630840b7
6 changed files with 14 additions and 15 deletions
|
@ -196,8 +196,8 @@ struct Param
|
|||
bool inclusiveInContracts; // 'in' contracts of overridden methods must be a superset of parent contract
|
||||
bool vsafe; // use enhanced @safe checking
|
||||
bool ehnogc; // use @nogc exception handling
|
||||
bool dtorFields; // destruct fields of partially constructed objects
|
||||
// https://issues.dlang.org/show_bug.cgi?id=14246
|
||||
FeatureState dtorFields; // destruct fields of partially constructed objects
|
||||
// https://issues.dlang.org/show_bug.cgi?id=14246
|
||||
bool fieldwise; // do struct equality testing field-wise rather than by memcmp()
|
||||
bool rvalueRefParam; // allow rvalues to be arguments to ref parameters
|
||||
CppStdRevision cplusplus; // version of C++ name mangling to support
|
||||
|
|
|
@ -188,7 +188,7 @@ struct ModuleDeclaration
|
|||
{
|
||||
Loc loc;
|
||||
Identifier *id;
|
||||
Identifiers *packages; // array of Identifier's representing packages
|
||||
DArray<Identifier*> packages; // array of Identifier's representing packages
|
||||
bool isdeprecated; // if it is a deprecated module
|
||||
Expression *msg;
|
||||
|
||||
|
|
|
@ -101,6 +101,8 @@ enum ENUMTY
|
|||
Tint128,
|
||||
Tuns128,
|
||||
Ttraits,
|
||||
Tmixin,
|
||||
Tnoreturn,
|
||||
TMAX
|
||||
};
|
||||
typedef unsigned char TY; // ENUMTY
|
||||
|
@ -186,6 +188,7 @@ public:
|
|||
static Type *tdstring; // immutable(dchar)[]
|
||||
static Type *terror; // for error recovery
|
||||
static Type *tnull; // for null type
|
||||
static Type *tnoreturn; // for bottom type typeof(*null)
|
||||
|
||||
static Type *tsize_t; // matches size_t alias
|
||||
static Type *tptrdiff_t; // matches ptrdiff_t alias
|
||||
|
|
|
@ -25,12 +25,10 @@ bool isFromLDC_DCompute(Dsymbol *sym) {
|
|||
auto moduleDecl = mod->md;
|
||||
if (!moduleDecl)
|
||||
return false;
|
||||
if (!moduleDecl->packages)
|
||||
return false;
|
||||
|
||||
if (moduleDecl->packages->length != 1)
|
||||
if (moduleDecl->packages.length != 1)
|
||||
return false;
|
||||
if ((*moduleDecl->packages)[0] != Id::ldc)
|
||||
if (moduleDecl->packages.ptr[0] != Id::ldc)
|
||||
return false;
|
||||
|
||||
return moduleDecl->id == Id::dcompute;
|
||||
|
|
|
@ -59,12 +59,10 @@ std::string hashSymbolName(llvm::StringRef name, Dsymbol *symb) {
|
|||
{
|
||||
auto moddecl = symb->getModule()->md;
|
||||
assert(moddecl);
|
||||
if (auto packages = moddecl->packages) {
|
||||
for (auto package : *packages) {
|
||||
llvm::StringRef str = package->toChars();
|
||||
ret += ldc::to_string(str.size());
|
||||
ret += str;
|
||||
}
|
||||
for (size_t i = 0; i < moddecl->packages.length; ++i) {
|
||||
llvm::StringRef str = moddecl->packages.ptr[i]->toChars();
|
||||
ret += ldc::to_string(str.size());
|
||||
ret += str;
|
||||
}
|
||||
llvm::StringRef str = moddecl->id->toChars();
|
||||
ret += ldc::to_string(str.size());
|
||||
|
|
|
@ -41,8 +41,8 @@ bool isMagicModule(const ModuleDeclaration *moduleDecl, const Identifier *id) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (moduleDecl->packages->length != 1 ||
|
||||
(*moduleDecl->packages)[0] != Id::ldc) {
|
||||
if (moduleDecl->packages.length != 1 ||
|
||||
moduleDecl->packages.ptr[0] != Id::ldc) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue