summaryrefslogtreecommitdiff
path: root/include/llvm/Support/AlignOf.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-11 17:24:50 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-11 17:24:50 +0000
commit1f801fa5ada9cb40fb97ae755c282e91af54a1bc (patch)
tree892502fb68fc883c8ed89d9185f8cd586e8ef8a9 /include/llvm/Support/AlignOf.h
parent04feb51886805046e8b1af10b7d21bc1ef85f457 (diff)
downloadllvm-1f801fa5ada9cb40fb97ae755c282e91af54a1bc.tar.gz
llvm-1f801fa5ada9cb40fb97ae755c282e91af54a1bc.tar.bz2
llvm-1f801fa5ada9cb40fb97ae755c282e91af54a1bc.tar.xz
Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/AlignOf.h')
-rw-r--r--include/llvm/Support/AlignOf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/AlignOf.h b/include/llvm/Support/AlignOf.h
index 26592b9ef6..a6d3f25c26 100644
--- a/include/llvm/Support/AlignOf.h
+++ b/include/llvm/Support/AlignOf.h
@@ -35,6 +35,10 @@ private:
template <typename T>
struct AlignOf {
enum { Alignment = sizeof(AlignmentCalcImpl<T>) - sizeof(T) };
+ enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
+ enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
+ enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
+ enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
};
/// alignof - A templated function that returns the mininum alignment of