summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/DataLayout.cpp
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
commit6d05e69d5a332306e5d4270f1fa42a828db6ff55 (patch)
treefd4c1b1295a3ffef179288843f67591f8d388747 /llvm/lib/VMCore/DataLayout.cpp
parent90c9cbfed4e5cad132d2631cb025fbdce2757727 (diff)
downloadbcm5719-llvm-6d05e69d5a332306e5d4270f1fa42a828db6ff55.tar.gz
bcm5719-llvm-6d05e69d5a332306e5d4270f1fa42a828db6ff55.zip
Implement TargetData with the DataLayout class, this will allow LLVM projects to transition to DataLayout without loosing functionality.
llvm-svn: 165318
Diffstat (limited to 'llvm/lib/VMCore/DataLayout.cpp')
-rw-r--r--llvm/lib/VMCore/DataLayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/DataLayout.cpp b/llvm/lib/VMCore/DataLayout.cpp
index 075350c554e..e10e12f514a 100644
--- a/llvm/lib/VMCore/DataLayout.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud