//===----------------------------------------------------------------------===//
#include "X86MCAsmInfo.h"
-#include "llvm/ADT/Triple.h"
+#include "llvm/ADT/TargetTuple.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSectionELF.h"
void X86MCAsmInfoDarwin::anchor() { }
-X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &T) {
- bool is64Bit = T.getArch() == Triple::x86_64;
+X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const TargetTuple &TT) {
+ bool is64Bit = TT.getArch() == TargetTuple::x86_64;
if (is64Bit)
PointerSize = CalleeSaveStackSlotSize = 8;
// old assembler lacks some directives
// FIXME: this should really be a check on the assembler characteristics
// rather than OS version
- if (T.isMacOSX() && T.isMacOSXVersionLT(10, 6))
+ if (TT.isMacOSX() && TT.isMacOSXVersionLT(10, 6))
HasWeakDefCanBeHiddenDirective = false;
// Assume ld64 is new enough that the abs-ified FDE relocs may be used
UseIntegratedAssembler = true;
}
-X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)
- : X86MCAsmInfoDarwin(Triple) {
-}
+X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const TargetTuple &TT)
+ : X86MCAsmInfoDarwin(TT) {}
void X86ELFMCAsmInfo::anchor() { }
-X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
- bool is64Bit = T.getArch() == Triple::x86_64;
- bool isX32 = T.getEnvironment() == Triple::GNUX32;
+X86ELFMCAsmInfo::X86ELFMCAsmInfo(const TargetTuple &TT) {
+ bool is64Bit = TT.getArch() == TargetTuple::x86_64;
+ bool isX32 = TT.getEnvironment() == TargetTuple::GNUX32;
// For ELF, x86-64 pointer size depends on the ABI.
// For x86-64 without the x32 ABI, pointer size is 8. For x86 and for x86-64
MCStreamer &Streamer) const {
MCContext &Context = Streamer.getContext();
const MCExpr *Res =
- MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Context);
- const MCExpr *Four = MCConstantExpr::Create(4, Context);
- return MCBinaryExpr::CreateAdd(Res, Four, Context);
+ MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Context);
+ const MCExpr *Four = MCConstantExpr::create(4, Context);
+ return MCBinaryExpr::createAdd(Res, Four, Context);
}
void X86MCAsmInfoMicrosoft::anchor() { }
-X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(const Triple &Triple) {
- if (Triple.getArch() == Triple::x86_64) {
+X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(const TargetTuple &TT) {
+ if (TT.getArch() == TargetTuple::x86_64) {
PrivateGlobalPrefix = ".L";
PrivateLabelPrefix = ".L";
PointerSize = 8;
WinEHEncodingType = WinEH::EncodingType::Itanium;
- ExceptionsType = ExceptionHandling::WinEH;
+ } else {
+ // 32-bit X86 doesn't use CFI, so this isn't a real encoding type. It's just
+ // a place holder that the Windows EHStreamer looks for to suppress CFI
+ // output. In particular, usesWindowsCFI() returns false.
+ WinEHEncodingType = WinEH::EncodingType::X86;
}
+ ExceptionsType = ExceptionHandling::WinEH;
+
AssemblerDialect = AsmWriterFlavor;
TextAlignFillValue = 0x90;
void X86MCAsmInfoGNUCOFF::anchor() { }
-X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const Triple &Triple) {
- assert(Triple.isOSWindows() && "Windows is the only supported COFF target");
- if (Triple.getArch() == Triple::x86_64) {
+X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const TargetTuple &TT) {
+ assert(TT.isOSWindows() && "Windows is the only supported COFF target");
+ if (TT.getArch() == TargetTuple::x86_64) {
PrivateGlobalPrefix = ".L";
PrivateLabelPrefix = ".L";
PointerSize = 8;