From 00b396c0a0d7d04246c6326c4f3fad6f81eb8453 Mon Sep 17 00:00:00 2001 From: Vadzim Dambrouski Date: Fri, 23 Jun 2017 21:12:56 +0000 Subject: [PATCH] [MSP430] Fix data layout string. Summary: Change data layout string so it would be compatible with MSP430 EABI. Depends on D34561 Reviewers: asl, awygle Reviewed By: asl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34562 llvm-svn: 306161 --- clang/lib/Basic/Targets.cpp | 2 +- clang/test/CodeGen/target-data.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index e23a93e8ced7..aee413e95730 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -7503,7 +7503,7 @@ public: IntPtrType = SignedInt; PtrDiffType = SignedInt; SigAtomicType = SignedLong; - resetDataLayout("e-m:e-p:16:16-i32:16:32-a:16-n8:16"); + resetDataLayout("e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"); } void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override { diff --git a/clang/test/CodeGen/target-data.c b/clang/test/CodeGen/target-data.c index 1e8ce6a2fd12..68ee8f02d2ee 100644 --- a/clang/test/CodeGen/target-data.c +++ b/clang/test/CodeGen/target-data.c @@ -175,7 +175,7 @@ // RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \ // RUN: FileCheck %s -check-prefix=MSP430 -// MSP430: target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16" +// MSP430: target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16" // RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \ // RUN: FileCheck %s -check-prefix=TCE