From 6b8e207b00396f6de653db7e56a76e8cebd1e862 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Tue, 12 Jul 2016 11:55:50 +0100 Subject: [PATCH] [LLVM, Darwin, ppc] Make DL reflect i1 32b size and align. PowerPC Darwin (m32) has a 32bit bool. --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index a8d7955ef54..199bc48b5e0 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -138,6 +138,9 @@ static std::string getDataLayoutString(const Triple &T) { else Ret += "-n32"; + if (T.isOSDarwin() && !is64Bit) + Ret += "-i1:32:32"; // Bools are 32 bit on Darwin32. + return Ret; }