//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
#include "llvm/Support/ManagedStatic.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/Config/config.h"
#include <algorithm>
#include <cstdlib>
#include <sstream>
// TargetData Class Implementation
//===----------------------------------------------------------------------===//
-bool TargetData::hostIsLittleEndian() const {
-#ifdef LSB_FIRST
- return true;
-#else
- return false;
-#endif
-}
-
/*!
A TargetDescription string consists of a sequence of hyphen-delimited
specifiers for target endianness, pointer size and alignments, and various
return ABIInfo ? Alignments[i].ABIAlign : Alignments[i].PrefAlign;
// The best match so far depends on what we're looking for.
- if (AlignType == VECTOR_ALIGN) {
+ if (AlignType == VECTOR_ALIGN && Alignments[i].AlignType == VECTOR_ALIGN) {
// If this is a specification for a smaller vector type, we will fall back
// to it. This happens because <128 x double> can be implemented in terms
// of 64 <2 x double>.
- if (Alignments[i].AlignType == VECTOR_ALIGN &&
- Alignments[i].TypeBitWidth < BitWidth) {
+ if (Alignments[i].TypeBitWidth < BitWidth) {
// Verify that we pick the biggest of the fallbacks.
if (BestMatchIdx == -1 ||
- Alignments[BestMatchIdx].TypeBitWidth < BitWidth)
+ Alignments[BestMatchIdx].TypeBitWidth < Alignments[i].TypeBitWidth)
BestMatchIdx = i;
}
} else if (AlignType == INTEGER_ALIGN &&