mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-30 14:50:30 +00:00
Remove a bunch of unused variable assignments.
Found by the clang static analyzer. llvm-svn: 148541
This commit is contained in:
parent
1d768583f5
commit
fe9eb0e6e8
@ -1380,14 +1380,10 @@ uint64_t ELFObjectWriter::GetSectionAddressSize(const MCAsmLayout &Layout,
|
||||
void ELFObjectWriter::WriteDataSectionData(MCAssembler &Asm,
|
||||
const MCAsmLayout &Layout,
|
||||
const MCSectionELF &Section) {
|
||||
uint64_t FileOff = OS.tell();
|
||||
const MCSectionData &SD = Asm.getOrCreateSectionData(Section);
|
||||
|
||||
uint64_t Padding = OffsetToAlignment(FileOff, SD.getAlignment());
|
||||
uint64_t Padding = OffsetToAlignment(OS.tell(), SD.getAlignment());
|
||||
WriteZeros(Padding);
|
||||
FileOff += Padding;
|
||||
|
||||
FileOff += GetSectionFileSize(Layout, SD);
|
||||
|
||||
if (IsELFMetaDataSection(SD)) {
|
||||
for (MCSectionData::const_iterator i = SD.begin(), e = SD.end(); i != e;
|
||||
@ -1553,16 +1549,13 @@ void ELFObjectWriter::WriteObject(MCAssembler &Asm,
|
||||
for (unsigned i = 0; i < NumRegularSections + 1; ++i)
|
||||
WriteDataSectionData(Asm, Layout, *Sections[i]);
|
||||
|
||||
FileOff = OS.tell();
|
||||
uint64_t Padding = OffsetToAlignment(FileOff, NaturalAlignment);
|
||||
uint64_t Padding = OffsetToAlignment(OS.tell(), NaturalAlignment);
|
||||
WriteZeros(Padding);
|
||||
|
||||
// ... then the section header table ...
|
||||
WriteSectionHeader(Asm, GroupMap, Layout, SectionIndexMap,
|
||||
SectionOffsetMap);
|
||||
|
||||
FileOff = OS.tell();
|
||||
|
||||
// ... and then the remaining sections ...
|
||||
for (unsigned i = NumRegularSections + 1; i < NumSections; ++i)
|
||||
WriteDataSectionData(Asm, Layout, *Sections[i]);
|
||||
|
@ -1914,12 +1914,11 @@ PPCTargetLowering::LowerFormalArguments_Darwin(
|
||||
for (unsigned ArgNo = 0, e = Ins.size(); ArgNo != e;
|
||||
++ArgNo) {
|
||||
EVT ObjectVT = Ins[ArgNo].VT;
|
||||
unsigned ObjSize = ObjectVT.getSizeInBits()/8;
|
||||
ISD::ArgFlagsTy Flags = Ins[ArgNo].Flags;
|
||||
|
||||
if (Flags.isByVal()) {
|
||||
// ObjSize is the true size, ArgSize rounded up to multiple of regs.
|
||||
ObjSize = Flags.getByValSize();
|
||||
unsigned ObjSize = Flags.getByValSize();
|
||||
unsigned ArgSize =
|
||||
((ObjSize + PtrByteSize - 1)/PtrByteSize) * PtrByteSize;
|
||||
VecArgOffset += ArgSize;
|
||||
|
Loading…
Reference in New Issue
Block a user