mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-10 17:34:09 +02:00
Fixes 2 kinds of warnings.
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true. 2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch. Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
This commit is contained in:
@@ -377,7 +377,7 @@ llvm::GlobalVariable * IrStruct::getInterfaceVtbl(BaseClass * b, bool new_instan
|
||||
};
|
||||
|
||||
llvm::Constant* c = llvm::ConstantExpr::getGetElementPtr(
|
||||
getInterfaceArraySymbol(), idxs, 2);
|
||||
getInterfaceArraySymbol(), idxs, true);
|
||||
|
||||
constants.push_back(c);
|
||||
|
||||
@@ -533,7 +533,7 @@ LLConstant * IrStruct::getClassInfoInterfaces()
|
||||
};
|
||||
|
||||
LLConstant* ptr = llvm::ConstantExpr::getGetElementPtr(
|
||||
classInterfacesArray, idxs, 2);
|
||||
classInterfacesArray, idxs, true);
|
||||
|
||||
// return as a slice
|
||||
return DtoConstSlice( DtoConstSize_t(cd->vtblInterfaces->dim), ptr );
|
||||
|
||||
Reference in New Issue
Block a user