Initialize new TargetC fields

This commit is contained in:
Martin Kinkelin 2022-04-26 23:47:15 +02:00
parent 8b3b566a4a
commit a3716c0044
2 changed files with 4 additions and 1 deletions

View file

@ -795,7 +795,6 @@ version (IN_LLVM)
TypeTuple toArgTypes(Type t); TypeTuple toArgTypes(Type t);
bool isReturnOnStack(TypeFunction tf, bool needsThis); bool isReturnOnStack(TypeFunction tf, bool needsThis);
// unused: ulong parameterSize(const ref Loc loc, Type t);
bool preferPassByRef(Type t); bool preferPassByRef(Type t);
Expression getTargetInfo(const(char)* name, const ref Loc loc); Expression getTargetInfo(const(char)* name, const ref Loc loc);
bool isCalleeDestroyingArgs(TypeFunction tf); bool isCalleeDestroyingArgs(TypeFunction tf);

View file

@ -106,7 +106,11 @@ void Target::_init(const Param &params) {
maxStaticDataSize = std::numeric_limits<unsigned long long>::max(); maxStaticDataSize = std::numeric_limits<unsigned long long>::max();
c.crtDestructorsSupported = true; // unused as of 2.099 c.crtDestructorsSupported = true; // unused as of 2.099
c.boolsize = 1;
c.shortsize = 2;
c.intsize = 4;
c.longsize = (ptrsize == 8) && !isMSVC ? 8 : 4; c.longsize = (ptrsize == 8) && !isMSVC ? 8 : 4;
c.long_longsize = 8;
c.long_doublesize = realsize; c.long_doublesize = realsize;
c.wchar_tsize = triple.isOSWindows() ? 2 : 4; c.wchar_tsize = triple.isOSWindows() ? 2 : 4;
c.bitFieldStyle = c.bitFieldStyle =