diff --git a/include/llvm/DataLayout.h b/include/llvm/DataLayout.h index 4cb77663876..cc020171899 100644 --- a/include/llvm/DataLayout.h +++ b/include/llvm/DataLayout.h @@ -39,6 +39,7 @@ class ArrayRef; /// Enum used to categorize the alignment types stored by LayoutAlignElem enum AlignTypeEnum { + INVALID_ALIGN = 0, ///< An invalid alignment INTEGER_ALIGN = 'i', ///< Integer type alignment VECTOR_ALIGN = 'v', ///< Vector type alignment FLOAT_ALIGN = 'f', ///< Floating point type alignment diff --git a/lib/VMCore/DataLayout.cpp b/lib/VMCore/DataLayout.cpp index b0ac62686d1..6cf51f5a4dd 100644 --- a/lib/VMCore/DataLayout.cpp +++ b/lib/VMCore/DataLayout.cpp @@ -118,8 +118,7 @@ LayoutAlignElem::operator==(const LayoutAlignElem &rhs) const { } const LayoutAlignElem -DataLayout::InvalidAlignmentElem = - LayoutAlignElem::get((AlignTypeEnum) -1, 0, 0, 0); +DataLayout::InvalidAlignmentElem = LayoutAlignElem::get(INVALID_ALIGN, 0, 0, 0); //===----------------------------------------------------------------------===// // PointerAlignElem, PointerAlign support