mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-20 06:05:22 +02:00
Removed redundant global.params.cpu field.
Now that we have global.params.targetTriple, the information is only duplicated.
This commit is contained in:
15
dmd/mars.h
15
dmd/mars.h
@@ -140,18 +140,7 @@ the target object file format:
|
||||
|
||||
struct OutBuffer;
|
||||
|
||||
// LDC
|
||||
enum ARCH
|
||||
{
|
||||
ARCHinvalid = llvm::Triple::UnknownArch,
|
||||
ARCHx86 = llvm::Triple::x86,
|
||||
ARCHx86_64 = llvm::Triple::x86_64,
|
||||
ARCHppc = llvm::Triple::ppc,
|
||||
ARCHppc_64 = llvm::Triple::ppc64,
|
||||
ARCHarm = llvm::Triple::arm,
|
||||
ARCHthumb = llvm::Triple::thumb,
|
||||
};
|
||||
|
||||
#if IN_LLVM
|
||||
enum OUTPUTFLAG
|
||||
{
|
||||
OUTPUTFLAGno,
|
||||
@@ -169,6 +158,7 @@ enum OS
|
||||
OSFreeBSD = llvm::Triple::FreeBSD,
|
||||
OSSolaris = llvm::Triple::Solaris,
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef unsigned char ubyte;
|
||||
|
||||
@@ -191,7 +181,6 @@ struct Param
|
||||
#endif
|
||||
char vtls; // identify thread local variables
|
||||
// KN Start merge conflict
|
||||
ARCH cpu; // target CPU
|
||||
OS os; // target OS
|
||||
bool is64bit; // generate 64 bit code
|
||||
bool useDeprecated; // allow use of deprecated features
|
||||
|
||||
@@ -276,12 +276,12 @@ void Type::init()
|
||||
}
|
||||
|
||||
// set real size and padding
|
||||
if (global.params.cpu == ARCHx86)
|
||||
if (global.params.targetTriple.getArch() == llvm::Triple::x86)
|
||||
{
|
||||
REALSIZE = 12;
|
||||
REALPAD = 2;
|
||||
}
|
||||
else if (global.params.cpu == ARCHx86_64)
|
||||
else if (global.params.targetTriple.getArch() == llvm::Triple::x86_64)
|
||||
{
|
||||
REALSIZE = 16;
|
||||
REALPAD = 6;
|
||||
@@ -1175,8 +1175,11 @@ unsigned TypeBasic::alignsize()
|
||||
#if IN_LLVM
|
||||
unsigned TypeBasic::memalign(unsigned salign)
|
||||
{
|
||||
if (global.params.cpu == ARCHx86_64 && (ty == Tfloat80 || ty == Timaginary80))
|
||||
if (global.params.targetTriple.getArch() == llvm::Triple::x86_64 &&
|
||||
(ty == Tfloat80 || ty == Timaginary80))
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
return Type::memalign(salign);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user