From: Edward O'Callaghan Date: Sat, 21 Nov 2009 00:49:54 +0000 (+0000) Subject: Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cf910efc4fb7001a6d276ed2eabf01f0f0efaaa;p=clang Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 695f51d2c4..49eaafec7d 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -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 diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index b6c4df87f2..a1f97f4eeb 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -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; diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 8a4614acc7..e5a4c434c3 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -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,