From a056166dc2261d4649c4b159406f5bfd33fb5bb1 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 17 Jul 2014 16:27:40 +0000 Subject: [PATCH] MC: fix MCAsmInfo usage for windows-itanium Windows itanium uses the GNUCOFF assmebly format, not ELF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213274 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | 3 ++- test/MC/X86/x86-itanium.ll | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/MC/X86/x86-itanium.ll diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp index 5e29e5c359a..3bfad6c71b9 100644 --- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp +++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp @@ -272,7 +272,8 @@ static MCAsmInfo *createX86MCAsmInfo(const MCRegisterInfo &MRI, StringRef TT) { MAI = new X86ELFMCAsmInfo(TheTriple); } else if (TheTriple.isWindowsMSVCEnvironment()) { MAI = new X86MCAsmInfoMicrosoft(TheTriple); - } else if (TheTriple.isOSCygMing()) { + } else if (TheTriple.isOSCygMing() || + TheTriple.isWindowsItaniumEnvironment()) { MAI = new X86MCAsmInfoGNUCOFF(TheTriple); } else { // The default is ELF. diff --git a/test/MC/X86/x86-itanium.ll b/test/MC/X86/x86-itanium.ll new file mode 100644 index 00000000000..1d8308dca75 --- /dev/null +++ b/test/MC/X86/x86-itanium.ll @@ -0,0 +1,6 @@ +; RUN: llc -mtriple i686-windows-itanium -filetype asm -o - %s | FileCheck %s + +@var = common global i32 0, align 4 + +; CHECK-NOT: .type _var,@object + -- 2.34.1