summaryrefslogtreecommitdiff
path: root/lib/VMCore
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-05 17:02:14 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-05 17:02:14 +0000
commitbf07a512f2fd6bbcd0b217060656e9d12b9da5b0 (patch)
tree59e3f59fc9f88f6ed81de776c3d80f1c660d27ad /lib/VMCore
parenta06fd990543c82c4cc735354914ae4be64eb83d6 (diff)
downloadllvm-bf07a512f2fd6bbcd0b217060656e9d12b9da5b0.tar.gz
llvm-bf07a512f2fd6bbcd0b217060656e9d12b9da5b0.tar.bz2
llvm-bf07a512f2fd6bbcd0b217060656e9d12b9da5b0.tar.xz
Implement TargetData with the DataLayout class, this will allow LLVM projects to transition to DataLayout without loosing functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/DataLayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/DataLayout.cpp b/lib/VMCore/DataLayout.cpp
index 075350c554..e10e12f514 100644
--- a/lib/VMCore/DataLayout.cpp
+++ b/lib/VMCore/DataLayout.cpp
@@ -317,7 +317,7 @@ DataLayout::setAlignment(AlignTypeEnum align_type, unsigned abi_align,
assert(pref_align < (1 << 16) && "Alignment doesn't fit in bitfield");
assert(bit_width < (1 << 24) && "Bit width doesn't fit in bitfield");
for (unsigned i = 0, e = Alignments.size(); i != e; ++i) {
- if (Alignments[i].AlignType == align_type &&
+ if (Alignments[i].AlignType == (unsigned)align_type &&
Alignments[i].TypeBitWidth == bit_width) {
// Update the abi, preferred alignments.
Alignments[i].ABIAlign = abi_align;
@@ -339,7 +339,7 @@ unsigned DataLayout::getAlignmentInfo(AlignTypeEnum AlignType,
int BestMatchIdx = -1;
int LargestInt = -1;
for (unsigned i = 0, e = Alignments.size(); i != e; ++i) {
- if (Alignments[i].AlignType == AlignType &&
+ if (Alignments[i].AlignType == (unsigned)AlignType &&
Alignments[i].TypeBitWidth == BitWidth)
return ABIInfo ? Alignments[i].ABIAlign : Alignments[i].PrefAlign;