]> granicus.if.org Git - clang/commitdiff
Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.
authorEdward O'Callaghan <eocallaghan@auroraux.org>
Sat, 21 Nov 2009 00:49:54 +0000 (00:49 +0000)
committerEdward O'Callaghan <eocallaghan@auroraux.org>
Sat, 21 Nov 2009 00:49:54 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp
lib/Basic/Targets.cpp

index 695f51d2c4c92baaebeeb83f0b0ba1c28843665f..49eaafec7db78d1503215e2bf622897d0f0db2c8 100644 (file)
@@ -80,7 +80,7 @@ public:
   };
 protected:
   IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType,
-          WIntType, Char16Type, Char32Type, Int64Type;
+          WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType;
 public:
   IntType getSizeType() const { return SizeType; }
   IntType getIntMaxType() const { return IntMaxType; }
@@ -94,6 +94,7 @@ public:
   IntType getChar16Type() const { return Char16Type; }
   IntType getChar32Type() const { return Char32Type; }
   IntType getInt64Type() const { return Int64Type; }
+  IntType getSigAtomicType() const { return SigAtomicType; }
 
 
   /// getTypeWidth - Return the width (in bits) of the specified integer type 
index b6c4df87f27256cea2acbd8a769ed2b61325ce61..a1f97f4eeb24e181cb49b7c72b91f8731178d8a1 100644 (file)
@@ -44,6 +44,7 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
   Char16Type = UnsignedShort;
   Char32Type = UnsignedInt;
   Int64Type = SignedLongLong;
+  SigAtomicType = SignedInt;
   FloatFormat = &llvm::APFloat::IEEEsingle;
   DoubleFormat = &llvm::APFloat::IEEEdouble;
   LongDoubleFormat = &llvm::APFloat::IEEEdouble;
index 8a4614acc7495c9b43779842a6d7cd3f242dc30b..e5a4c434c341de2990d4ccd1486740213fcccccb 100644 (file)
@@ -1533,6 +1533,7 @@ namespace {
       UIntMaxType = UnsignedLong;
       IntPtrType = SignedShort;
       PtrDiffType = SignedInt;
+      SigAtomicType = SignedLong;
       FloatWidth = 32;
       FloatAlign = 32;
       DoubleWidth = 32;
@@ -1600,6 +1601,7 @@ namespace {
       UIntMaxType = UnsignedLong;
       IntPtrType = SignedShort;
       PtrDiffType = SignedInt;
+      SigAtomicType = SignedLong;
       DescriptionString = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-n8:16";
    }
     virtual void getTargetDefines(const LangOptions &Opts,