mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00
Get rid of superfluous LDC-specific TypeBasic.alignment() override
16 is LLVM's default alignment for x87 floats and x86_64 targets (verified for Linux and macOS).
This commit is contained in:
parent
b3b06d0cc7
commit
6264d45199
4 changed files with 1 additions and 22 deletions
13
dmd/mtype.d
13
dmd/mtype.d
|
@ -3273,19 +3273,6 @@ extern (C++) final class TypeBasic : Type
|
||||||
return target.alignsize(this);
|
return target.alignsize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
version (IN_LLVM)
|
|
||||||
{
|
|
||||||
override structalign_t alignment()
|
|
||||||
{
|
|
||||||
if ( (ty == Tfloat80 || ty == Timaginary80) && (size(Loc.initial) > 8)
|
|
||||||
&& isArchx86_64() )
|
|
||||||
{
|
|
||||||
return 16;
|
|
||||||
}
|
|
||||||
return Type.alignment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override bool isintegral()
|
override bool isintegral()
|
||||||
{
|
{
|
||||||
//printf("TypeBasic::isintegral('%s') x%x\n", toChars(), flags);
|
//printf("TypeBasic::isintegral('%s') x%x\n", toChars(), flags);
|
||||||
|
|
|
@ -402,9 +402,6 @@ public:
|
||||||
Type *syntaxCopy();
|
Type *syntaxCopy();
|
||||||
d_uns64 size(const Loc &loc) /*const*/;
|
d_uns64 size(const Loc &loc) /*const*/;
|
||||||
unsigned alignsize();
|
unsigned alignsize();
|
||||||
#if IN_LLVM
|
|
||||||
structalign_t alignment();
|
|
||||||
#endif
|
|
||||||
bool isintegral();
|
bool isintegral();
|
||||||
bool isfloating() /*const*/;
|
bool isfloating() /*const*/;
|
||||||
bool isreal() /*const*/;
|
bool isreal() /*const*/;
|
||||||
|
|
|
@ -63,10 +63,6 @@ llvm::cl::opt<llvm::GlobalVariable::ThreadLocalMode> clThreadModel(
|
||||||
* Simple Triple helpers for DFE
|
* Simple Triple helpers for DFE
|
||||||
* TODO: find better location for this
|
* TODO: find better location for this
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
bool isArchx86_64() {
|
|
||||||
return global.params.targetTriple->getArch() == llvm::Triple::x86_64;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isTargetWindowsMSVC() {
|
bool isTargetWindowsMSVC() {
|
||||||
return global.params.targetTriple->isWindowsMSVCEnvironment();
|
return global.params.targetTriple->isWindowsMSVCEnvironment();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,5 +19,4 @@ import dmd.dtemplate;
|
||||||
/// Fixup an overloaded intrinsic name string.
|
/// Fixup an overloaded intrinsic name string.
|
||||||
extern (C++) void DtoSetFuncDeclIntrinsicName(TemplateInstance ti, TemplateDeclaration td, FuncDeclaration fd);
|
extern (C++) void DtoSetFuncDeclIntrinsicName(TemplateInstance ti, TemplateDeclaration td, FuncDeclaration fd);
|
||||||
|
|
||||||
extern (C++) bool isArchx86_64();
|
extern (C++) bool isTargetWindowsMSVC();
|
||||||
extern (C++) bool isTargetWindowsMSVC();
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue