[cfe-commits] r89520 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/Basic/TargetInfo.cpp lib/Basic/Targets.cpp

Edward O'Callaghan eocallaghan at auroraux.org
Fri Nov 20 16:49:55 PST 2009


Author: evocallaghan
Date: Fri Nov 20 18:49:54 2009
New Revision: 89520

URL: http://llvm.org/viewvc/llvm-project?rev=89520&view=rev
Log:
Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/Basic/TargetInfo.cpp
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=89520&r1=89519&r2=89520&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Fri Nov 20 18:49:54 2009
@@ -80,7 +80,7 @@
   };
 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 @@
   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 

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

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Fri Nov 20 18:49:54 2009
@@ -44,6 +44,7 @@
   Char16Type = UnsignedShort;
   Char32Type = UnsignedInt;
   Int64Type = SignedLongLong;
+  SigAtomicType = SignedInt;
   FloatFormat = &llvm::APFloat::IEEEsingle;
   DoubleFormat = &llvm::APFloat::IEEEdouble;
   LongDoubleFormat = &llvm::APFloat::IEEEdouble;

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

==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Nov 20 18:49:54 2009
@@ -1533,6 +1533,7 @@
       UIntMaxType = UnsignedLong;
       IntPtrType = SignedShort;
       PtrDiffType = SignedInt;
+      SigAtomicType = SignedLong;
       FloatWidth = 32;
       FloatAlign = 32;
       DoubleWidth = 32;
@@ -1600,6 +1601,7 @@
       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,





More information about the cfe-commits mailing list