diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-18 23:41:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-18 23:41:04 +0000 |
commit | 1c09b264e3729f87810cdb3b265d4f91ebdc8724 (patch) | |
tree | 1bca4eeeae493b3c0e9259d1a3cf22354b67f9c9 /clang/lib/Basic/Targets.cpp | |
parent | b79ee57080fa37ecd2ea0378e466530e844c7f3c (diff) | |
download | bcm5719-llvm-1c09b264e3729f87810cdb3b265d4f91ebdc8724.tar.gz bcm5719-llvm-1c09b264e3729f87810cdb3b265d4f91ebdc8724.zip |
Fix the DataLayout string produced by clang for NaCl.
Reviewed by Derek Schuff.
llvm-svn: 197628
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index b69b0dba543..0de37da809d 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -624,7 +624,18 @@ public: this->IntPtrType = TargetInfo::SignedInt; // RegParmMax is inherited from the underlying architecture this->LongDoubleFormat = &llvm::APFloat::IEEEdouble; - this->DescriptionString = "e-p:32:32-i64:64-v128:32"; + if (Triple.getArch() == llvm::Triple::arm) { + this->DescriptionString = "e-p:32:32-i64:64-v128:64:128-n32-S128"; + } else if (Triple.getArch() == llvm::Triple::x86) { + this->DescriptionString = "e-p:32:32-i64:64-n8:16:32-S128"; + } else if (Triple.getArch() == llvm::Triple::x86_64) { + this->DescriptionString = "e-p:32:32-i64:64-s:64-n8:16:32:64-S128"; + } else if (Triple.getArch() == llvm::Triple::mipsel) { + // Handled on mips' setDescriptionString. + } else { + assert(Triple.getArch() == llvm::Triple::le32); + this->DescriptionString = "e-p:32:32-i64:64"; + } } virtual typename Target::CallingConvCheckResult checkCallingConvention( CallingConv CC) const { |