[cfe-commits] r74805 - /cfe/trunk/lib/Basic/Targets.cpp

Eli Friedman eli.friedman at gmail.com
Sun Jul 5 15:31:18 PDT 2009


Author: efriedma
Date: Sun Jul  5 17:31:18 2009
New Revision: 74805

URL: http://llvm.org/viewvc/llvm-project?rev=74805&view=rev
Log:
More tweaks to types for OpenBSD.  Patch by Jonathan Gray.


Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=74805&r1=74804&r2=74805&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun Jul  5 17:31:18 2009
@@ -895,6 +895,7 @@
     OpenBSDTargetInfo<X86_32TargetInfo>(triple) {
     SizeType = UnsignedLong;
     IntPtrType = SignedLong;
+    PtrDiffType = SignedLong;
   }
 };
 } // end anonymous namespace
@@ -988,6 +989,18 @@
 } // end anonymous namespace
 
 namespace {
+class OpenBSDX86_64TargetInfo : public OpenBSDTargetInfo<X86_64TargetInfo> {
+public:
+  OpenBSDX86_64TargetInfo(const std::string& triple) 
+      : OpenBSDTargetInfo<X86_64TargetInfo>(triple) {
+    IntMaxType = SignedLongLong;
+    UIntMaxType = UnsignedLongLong;
+    Int64Type = SignedLongLong;
+  }
+};
+} // end anonymous namespace
+
+namespace {
 class ARMTargetInfo : public TargetInfo {
   enum {
     Armv4t,
@@ -1392,7 +1405,7 @@
     if (isLinux)
       return new LinuxTargetInfo<X86_64TargetInfo>(T);
     if (isOpenBSD)
-      return new OpenBSDTargetInfo<X86_64TargetInfo>(T);
+      return new OpenBSDX86_64TargetInfo(T);
     if (isFreeBSD)
       return new FreeBSDTargetInfo<X86_64TargetInfo>(T);
     if (isSolaris)





More information about the cfe-commits mailing list