mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-05 00:59:19 +00:00
Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24b9f258f1
commit
5177b3a8c4
@ -659,7 +659,8 @@ static Constant *SymbolicallyEvaluateGEP(ArrayRef<Constant *> Ops,
|
|||||||
unsigned BitWidth = TD->getTypeSizeInBits(IntPtrTy);
|
unsigned BitWidth = TD->getTypeSizeInBits(IntPtrTy);
|
||||||
APInt Offset =
|
APInt Offset =
|
||||||
APInt(BitWidth, TD->getIndexedOffset(Ptr->getType(),
|
APInt(BitWidth, TD->getIndexedOffset(Ptr->getType(),
|
||||||
makeArrayRef((Value **)Ops.data() + 1,
|
makeArrayRef((Value *const*)
|
||||||
|
Ops.data() + 1,
|
||||||
Ops.size() - 1)));
|
Ops.size() - 1)));
|
||||||
Ptr = StripPtrCastKeepAS(Ptr);
|
Ptr = StripPtrCastKeepAS(Ptr);
|
||||||
|
|
||||||
|
@ -2864,7 +2864,7 @@ bool BitcodeReader::InitStream() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool BitcodeReader::InitStreamFromBuffer() {
|
bool BitcodeReader::InitStreamFromBuffer() {
|
||||||
const unsigned char *BufPtr = (unsigned char *)Buffer->getBufferStart();
|
const unsigned char *BufPtr = (const unsigned char*)Buffer->getBufferStart();
|
||||||
const unsigned char *BufEnd = BufPtr+Buffer->getBufferSize();
|
const unsigned char *BufEnd = BufPtr+Buffer->getBufferSize();
|
||||||
|
|
||||||
if (Buffer->getBufferSize() & 3) {
|
if (Buffer->getBufferSize() & 3) {
|
||||||
|
@ -522,7 +522,7 @@ void StackColoring::expungeSlotMap(DenseMap<int, int> &SlotRemap,
|
|||||||
bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
|
bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
|
||||||
DEBUG(dbgs() << "********** Stack Coloring **********\n"
|
DEBUG(dbgs() << "********** Stack Coloring **********\n"
|
||||||
<< "********** Function: "
|
<< "********** Function: "
|
||||||
<< ((Value*)Func.getFunction())->getName() << '\n');
|
<< ((const Value*)Func.getFunction())->getName() << '\n');
|
||||||
MF = &Func;
|
MF = &Func;
|
||||||
MFI = MF->getFrameInfo();
|
MFI = MF->getFrameInfo();
|
||||||
Indexes = &getAnalysis<SlotIndexes>();
|
Indexes = &getAnalysis<SlotIndexes>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user