summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.cpp6
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index b6270108da2..d978eb179de 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -43,8 +43,7 @@ static const char *const x86_asm_table[] = {
"{cc}", "cc",
0,0};
-X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const Triple &Triple)
- : DarwinTargetAsmInfo(Triple) {
+X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const Triple &Triple) {
AsmTransCBE = x86_asm_table;
AssemblerDialect = AsmWriterFlavor;
@@ -55,6 +54,9 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const Triple &Triple)
if (!is64Bit)
Data64bitsDirective = 0; // we can't emit a 64-bit unit
+ // Leopard and above support aligned common symbols.
+ COMMDirectiveTakesAlignment = Triple.getDarwinMajorNumber() >= 9;
+
if (is64Bit) {
PersonalityPrefix = "";
PersonalitySuffix = "+4@GOTPCREL";
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.h b/llvm/lib/Target/X86/X86TargetAsmInfo.h
index 592d5e3396d..91de3682591 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.h
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.h
@@ -19,6 +19,8 @@
#include "llvm/Target/DarwinTargetAsmInfo.h"
namespace llvm {
+ class Triple;
+
struct X86DarwinTargetAsmInfo : public DarwinTargetAsmInfo {
explicit X86DarwinTargetAsmInfo(const Triple &Triple);
};
OpenPOWER on IntegriCloud