mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
PPC: Clean up pointer casting, no functionality change.
Silences GCC's -Wcast-qual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12e69a0267
commit
5a649ba0ee
@ -662,9 +662,9 @@ public:
|
|||||||
// explicitly.
|
// explicitly.
|
||||||
void *Mem = ::operator new(sizeof(PPCOperand) + Str.size());
|
void *Mem = ::operator new(sizeof(PPCOperand) + Str.size());
|
||||||
std::unique_ptr<PPCOperand> Op(new (Mem) PPCOperand(Token));
|
std::unique_ptr<PPCOperand> Op(new (Mem) PPCOperand(Token));
|
||||||
Op->Tok.Data = (const char *)(Op.get() + 1);
|
Op->Tok.Data = reinterpret_cast<const char *>(Op.get() + 1);
|
||||||
Op->Tok.Length = Str.size();
|
Op->Tok.Length = Str.size();
|
||||||
std::memcpy((void *)Op->Tok.Data, Str.data(), Str.size());
|
std::memcpy(const_cast<char *>(Op->Tok.Data), Str.data(), Str.size());
|
||||||
Op->StartLoc = S;
|
Op->StartLoc = S;
|
||||||
Op->EndLoc = S;
|
Op->EndLoc = S;
|
||||||
Op->IsPPC64 = IsPPC64;
|
Op->IsPPC64 = IsPPC64;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user