mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +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);
|
||||
APInt Offset =
|
||||
APInt(BitWidth, TD->getIndexedOffset(Ptr->getType(),
|
||||
makeArrayRef((Value **)Ops.data() + 1,
|
||||
makeArrayRef((Value *const*)
|
||||
Ops.data() + 1,
|
||||
Ops.size() - 1)));
|
||||
Ptr = StripPtrCastKeepAS(Ptr);
|
||||
|
||||
|
@ -2864,7 +2864,7 @@ bool BitcodeReader::InitStream() {
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (Buffer->getBufferSize() & 3) {
|
||||
|
@ -522,7 +522,7 @@ void StackColoring::expungeSlotMap(DenseMap<int, int> &SlotRemap,
|
||||
bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
|
||||
DEBUG(dbgs() << "********** Stack Coloring **********\n"
|
||||
<< "********** Function: "
|
||||
<< ((Value*)Func.getFunction())->getName() << '\n');
|
||||
<< ((const Value*)Func.getFunction())->getName() << '\n');
|
||||
MF = &Func;
|
||||
MFI = MF->getFrameInfo();
|
||||
Indexes = &getAnalysis<SlotIndexes>();
|
||||
|
Loading…
Reference in New Issue
Block a user