[llvm-commits] [dragonegg] r150489 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Tue Feb 14 08:48:06 PST 2012
Author: baldrick
Date: Tue Feb 14 10:48:05 2012
New Revision: 150489
URL: http://llvm.org/viewvc/llvm-project?rev=150489&view=rev
Log:
Pacify GCC (-Wsign-compare).
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=150489&r1=150488&r2=150489&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Feb 14 10:48:05 2012
@@ -2026,7 +2026,7 @@
AllocaInst *TreeToLLVM::getExceptionPtr(int RegionNo) {
assert(RegionNo >= 0 && "Invalid exception handling region!");
- if (RegionNo >= ExceptionPtrs.size())
+ if ((unsigned)RegionNo >= ExceptionPtrs.size())
ExceptionPtrs.resize(RegionNo + 1, 0);
AllocaInst *&ExceptionPtr = ExceptionPtrs[RegionNo];
@@ -2044,7 +2044,7 @@
AllocaInst *TreeToLLVM::getExceptionFilter(int RegionNo) {
assert(RegionNo >= 0 && "Invalid exception handling region!");
- if (RegionNo >= ExceptionFilters.size())
+ if ((unsigned)RegionNo >= ExceptionFilters.size())
ExceptionFilters.resize(RegionNo + 1, 0);
AllocaInst *&ExceptionFilter = ExceptionFilters[RegionNo];
@@ -2062,7 +2062,7 @@
BasicBlock *TreeToLLVM::getFailureBlock(int RegionNo) {
assert(RegionNo >= 0 && "Invalid exception handling region!");
- if (RegionNo >= FailureBlocks.size())
+ if ((unsigned)RegionNo >= FailureBlocks.size())
FailureBlocks.resize(RegionNo + 1, 0);
BasicBlock *&FailureBlock = FailureBlocks[RegionNo];
@@ -5856,7 +5856,7 @@
const tree type = TREE_TYPE(exp);
unsigned SizeInBytes = (TREE_INT_CST_LOW(TYPE_SIZE(type)) + 7) / 8;
Buffer.resize(SizeInBytes);
- int BytesWritten = native_encode_expr(exp, &Buffer[0], SizeInBytes);
+ unsigned BytesWritten = native_encode_expr(exp, &Buffer[0], SizeInBytes);
assert(BytesWritten == SizeInBytes && "Failed to fully encode expression!");
return BytesWritten;
}
More information about the llvm-commits
mailing list