aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorAnirudh Prasad <anirudh_prasad@hotmail.com>2021-09-24 14:05:55 -0400
committerAnirudh Prasad <anirudh_prasad@hotmail.com>2021-09-24 14:09:01 -0400
commite09a1dc47515d27ba5ca572a225208bb0d79fb3f (patch)
tree3bfc0a056a39dbd3d21f918d158a72efee9eedf8 /llvm/lib/IR/DataLayout.cpp
parentef976337f581dd8a80820a8b14b4bbd70670b7fc (diff)
downloadllvm-e09a1dc47515d27ba5ca572a225208bb0d79fb3f.zip
llvm-e09a1dc47515d27ba5ca572a225208bb0d79fb3f.tar.gz
llvm-e09a1dc47515d27ba5ca572a225208bb0d79fb3f.tar.bz2
[SystemZ][z/OS] Add GOFF Support to the DataLayout
- This patch adds in the GOFF mangling support to the LLVM data layout string. A corresponding additional line has been added into the data layout section in the language reference documentation. - Furthermore, this patch also sets the right data layout string for the z/OS target in the SystemZ backend. Reviewed By: uweigand, Kai, abhina.sreeskantharajan, MaskRay Differential Revision: https://reviews.llvm.org/D109362
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 4f6140e..5de47b8 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -151,6 +151,8 @@ PointerAlignElem::operator==(const PointerAlignElem &rhs) const {
//===----------------------------------------------------------------------===//
const char *DataLayout::getManglingComponent(const Triple &T) {
+ if (T.isOSBinFormatGOFF())
+ return "-m:l";
if (T.isOSBinFormatMachO())
return "-m:o";
if (T.isOSWindows() && T.isOSBinFormatCOFF())
@@ -500,6 +502,9 @@ Error DataLayout::parseSpecifier(StringRef Desc) {
case 'e':
ManglingMode = MM_ELF;
break;
+ case 'l':
+ ManglingMode = MM_GOFF;
+ break;
case 'o':
ManglingMode = MM_MachO;
break;