]> granicus.if.org Git - clang/commitdiff
More tweaks to types for OpenBSD. Patch by Jonathan Gray.
authorEli Friedman <eli.friedman@gmail.com>
Sun, 5 Jul 2009 22:31:18 +0000 (22:31 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sun, 5 Jul 2009 22:31:18 +0000 (22:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74805 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 7a5adea1a38c310d8941b76479933eac8da076a7..f850ea7dd427df7daeba58e7c074a861203aba73 100644 (file)
@@ -895,6 +895,7 @@ public:
     OpenBSDTargetInfo<X86_32TargetInfo>(triple) {
     SizeType = UnsignedLong;
     IntPtrType = SignedLong;
+    PtrDiffType = SignedLong;
   }
 };
 } // end anonymous namespace
@@ -987,6 +988,18 @@ public:
 };
 } // 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 {
@@ -1392,7 +1405,7 @@ TargetInfo* TargetInfo::CreateTargetInfo(const std::string &T) {
     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)