[cfe-commits] [PATCH] Add OpenBSD arch targets
Brad Smith
brad at comstyle.com
Thu Aug 2 05:17:24 PDT 2012
Add OpenBSD arch targets for powerpc, arm, mips64, mips64el and sparc.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp (revision 161152)
+++ lib/Basic/Targets.cpp (working copy)
@@ -778,7 +778,7 @@
}
// Target properties.
- if (getTriple().getOS() != llvm::Triple::NetBSD)
+ if (getTriple().getOS() != llvm::Triple::NetBSD && getTriple().getOS() != llvm::Triple::OpenBSD)
Builder.defineMacro("_BIG_ENDIAN");
Builder.defineMacro("__BIG_ENDIAN__");
@@ -956,6 +956,7 @@
case llvm::Triple::Linux:
case llvm::Triple::FreeBSD:
case llvm::Triple::NetBSD:
+ case llvm::Triple::OpenBSD:
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
IntPtrType = SignedInt;
@@ -4152,6 +4153,8 @@
return new FreeBSDTargetInfo<ARMTargetInfo>(T);
case llvm::Triple::NetBSD:
return new NetBSDTargetInfo<ARMTargetInfo>(T);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<ARMTargetInfo>(T);
case llvm::Triple::RTEMS:
return new RTEMSTargetInfo<ARMTargetInfo>(T);
default:
@@ -4199,6 +4202,8 @@
return new FreeBSDTargetInfo<Mips64EBTargetInfo>(T);
case llvm::Triple::NetBSD:
return new NetBSDTargetInfo<Mips64EBTargetInfo>(T);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<Mips64EBTargetInfo>(T);
default:
return new Mips64EBTargetInfo(T);
}
@@ -4213,6 +4218,8 @@
return new FreeBSDTargetInfo<Mips64ELTargetInfo>(T);
case llvm::Triple::NetBSD:
return new NetBSDTargetInfo<Mips64ELTargetInfo>(T);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<Mips64ELTargetInfo>(T);
default:
return new Mips64ELTargetInfo(T);
}
@@ -4235,6 +4242,8 @@
return new FreeBSDTargetInfo<PPC32TargetInfo>(T);
case llvm::Triple::NetBSD:
return new NetBSDTargetInfo<PPC32TargetInfo>(T);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<PPC32TargetInfo>(T);
case llvm::Triple::RTEMS:
return new RTEMSTargetInfo<PPC32TargetInfo>(T);
default:
@@ -4275,6 +4284,8 @@
return new SolarisSparcV8TargetInfo(T);
case llvm::Triple::NetBSD:
return new NetBSDTargetInfo<SparcV8TargetInfo>(T);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<SparcV8TargetInfo>(T);
case llvm::Triple::RTEMS:
return new RTEMSTargetInfo<SparcV8TargetInfo>(T);
default:
More information about the cfe-commits
mailing list