[BOLT][NFC] Fix white space

(cherry picked from FBD15485688)
This commit is contained in:
Maksim Panchenko 2019-05-23 15:49:36 -07:00
parent f57d3c00fc
commit e5b1d9cd8c
7 changed files with 11 additions and 12 deletions

View File

@ -459,7 +459,7 @@ public:
/// Add a range of instructions to the end of this basic block.
template <typename RangeTy>
void addInstructions(RangeTy R) {
for(auto &I : R)
for (auto &I : R)
addInstruction(I);
}

View File

@ -106,7 +106,7 @@ public:
bool isAtomic() const {
return isTopLevelJumpTable() || !Parent;
}
iterator_range<std::vector<std::string>::const_iterator> names() const {
return make_range(Names.begin(), Names.end());
}

View File

@ -1905,7 +1905,6 @@ void BinaryFunction::postProcessCFG() {
// Eliminate inconsistencies between branch instructions and CFG.
postProcessBranches();
}
calculateMacroOpFusionStats();
@ -3988,7 +3987,7 @@ DebugAddressRangesVector BinaryFunction::translateInputToOutputRanges(
std::sort(OutputRanges.begin(), OutputRanges.end());
DebugAddressRangesVector MergedRanges;
PrevEndAddress = 0;
for(const auto &Range : OutputRanges) {
for (const auto &Range : OutputRanges) {
if (Range.LowPC <= PrevEndAddress) {
MergedRanges.back().HighPC = std::max(MergedRanges.back().HighPC,
Range.HighPC);
@ -4125,7 +4124,7 @@ DWARFDebugLoc::LocationList BinaryFunction::translateInputToOutputLocationList(
DWARFDebugLoc::LocationList MergedLL;
PrevEndAddress = 0;
PrevLoc = nullptr;
for(const auto &Entry : OutputLL.Entries) {
for (const auto &Entry : OutputLL.Entries) {
if (Entry.Begin <= PrevEndAddress && *PrevLoc == Entry.Loc) {
MergedLL.Entries.back().End = std::max(Entry.End,
MergedLL.Entries.back().End);

View File

@ -66,7 +66,7 @@ BinarySection::~BinarySection() {
delete[] getData();
return;
}
if (!isAllocatable() &&
(!hasSectionRef() ||
OutputContents.data() != getContents(Section).data())) {

View File

@ -1513,7 +1513,7 @@ void InlineMemcpy::runOnFunctions(BinaryContext &BC) {
uint64_t NumInlinedDyno = 0;
for (auto &BFI : BC.getBinaryFunctions()) {
for (auto &BB : BFI.second) {
for(auto II = BB.begin(); II != BB.end(); ++II) {
for (auto II = BB.begin(); II != BB.end(); ++II) {
auto &Inst = *II;
if (!BC.MIB->isCall(Inst) || MCPlus::getNumPrimeOperands(Inst) != 1 ||
@ -1614,7 +1614,7 @@ void SpecializeMemcpy1::runOnFunctions(BinaryContext &BC) {
std::vector<BinaryBasicBlock *> Blocks(Function.pbegin(), Function.pend());
size_t CallSiteID = 0;
for (auto *CurBB : Blocks) {
for(auto II = CurBB->begin(); II != CurBB->end(); ++II) {
for (auto II = CurBB->begin(); II != CurBB->end(); ++II) {
auto &Inst = *II;
if (!BC.MIB->isCall(Inst) || MCPlus::getNumPrimeOperands(Inst) != 1 ||

View File

@ -39,7 +39,7 @@ private:
: Type(Type)
{}
};
std::unordered_map<const BinaryFunction *, InliningInfo> InliningCandidates;
/// Count total amount of bytes inlined for all instances of Inliner.
@ -58,7 +58,7 @@ private:
/// Size in bytes of a tail call instruction.
static uint64_t SizeOfTailCallInst;
/// Set of functions modified by inlining (used for printing).
std::unordered_set<const BinaryFunction *> Modified;

View File

@ -95,7 +95,7 @@ public:
bool ValidateInternalCalls::fixCFGForPIC(BinaryFunction &Function) const {
const BinaryContext &BC = Function.getBinaryContext();
for (auto &BB : Function) {
for(auto II = BB.begin(); II != BB.end(); ++II) {
for (auto II = BB.begin(); II != BB.end(); ++II) {
auto &Inst = *II;
auto *Target = getInternalCallTarget(Function, Inst);
if (!Target || BC.MIB->hasAnnotation(Inst, getProcessedICTag()))
@ -302,7 +302,7 @@ void ValidateInternalCalls::runOnFunctions(BinaryContext &BC) {
for (auto &BFI : BC.getBinaryFunctions()) {
BinaryFunction &Function = BFI.second;
for (auto &BB : Function) {
for(auto &Inst : BB) {
for (auto &Inst : BB) {
if (getInternalCallTarget(Function, Inst)) {
NeedsValidation.insert(&Function);
Function.setSimple(false);