mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-27 13:20:29 +00:00
[llvm] Use append_range (NFC)
This commit is contained in:
parent
065bbe82a5
commit
04422f73a1
@ -302,10 +302,8 @@ public:
|
||||
|
||||
// If there is a blockinfo for this BlockID, add all the predefined abbrevs
|
||||
// to the abbrev list.
|
||||
if (BlockInfo *Info = getBlockInfo(BlockID)) {
|
||||
CurAbbrevs.insert(CurAbbrevs.end(), Info->Abbrevs.begin(),
|
||||
Info->Abbrevs.end());
|
||||
}
|
||||
if (BlockInfo *Info = getBlockInfo(BlockID))
|
||||
append_range(CurAbbrevs, Info->Abbrevs);
|
||||
}
|
||||
|
||||
void ExitBlock() {
|
||||
|
@ -564,8 +564,7 @@ protected:
|
||||
// made to the CFG), so the PreViewCFG needs all the updates reverse
|
||||
// applied.
|
||||
SmallVector<UpdateType> AllUpdates(Updates.begin(), Updates.end());
|
||||
for (auto &Update : PostViewUpdates)
|
||||
AllUpdates.push_back(Update);
|
||||
append_range(AllUpdates, PostViewUpdates);
|
||||
GraphDiff<NodePtr, IsPostDom> PreViewCFG(AllUpdates,
|
||||
/*ReverseApplyUpdates=*/true);
|
||||
GraphDiff<NodePtr, IsPostDom> PostViewCFG(PostViewUpdates);
|
||||
|
@ -123,8 +123,7 @@ collectNestedBranches(const coverage::CoverageMapping &Coverage,
|
||||
// Recursively collect branches from nested expansions.
|
||||
auto NestedExpansions = ExpansionCoverage.getExpansions();
|
||||
auto NestedExBranches = collectNestedBranches(Coverage, NestedExpansions);
|
||||
Branches.insert(Branches.end(), NestedExBranches.begin(),
|
||||
NestedExBranches.end());
|
||||
append_range(Branches, NestedExBranches);
|
||||
|
||||
// Add branches from this level of expansion.
|
||||
auto ExBranches = ExpansionCoverage.getBranches();
|
||||
|
@ -91,8 +91,7 @@ collectNestedBranches(const coverage::CoverageMapping &Coverage,
|
||||
auto NestedExpansions = ExpansionCoverage.getExpansions();
|
||||
auto NestedExBranches = collectNestedBranches(Coverage, NestedExpansions,
|
||||
ViewDepth + 1, SrcLine);
|
||||
Branches.insert(Branches.end(), NestedExBranches.begin(),
|
||||
NestedExBranches.end());
|
||||
append_range(Branches, NestedExBranches);
|
||||
|
||||
// Add branches from this level of expansion.
|
||||
auto ExBranches = ExpansionCoverage.getBranches();
|
||||
@ -123,7 +122,7 @@ void renderBranchExecutionCounts(raw_ostream &OS,
|
||||
collectNestedBranches(Coverage, FileCoverage.getExpansions());
|
||||
|
||||
// Append Expansion Branches to Source Branches.
|
||||
Branches.insert(Branches.end(), ExBranches.begin(), ExBranches.end());
|
||||
append_range(Branches, ExBranches);
|
||||
|
||||
// Sort branches based on line number to ensure branches corresponding to the
|
||||
// same source line are counted together.
|
||||
|
@ -593,8 +593,7 @@ void COFFDumper::cacheRelocations() {
|
||||
for (const SectionRef &S : Obj->sections()) {
|
||||
const coff_section *Section = Obj->getCOFFSection(S);
|
||||
|
||||
for (const RelocationRef &Reloc : S.relocations())
|
||||
RelocMap[Section].push_back(Reloc);
|
||||
append_range(RelocMap[Section], S.relocations());
|
||||
|
||||
// Sort relocations by address.
|
||||
llvm::sort(RelocMap[Section], [](RelocationRef L, RelocationRef R) {
|
||||
|
@ -564,8 +564,7 @@ void thinlto_debug_options(const char *const *options, int number) {
|
||||
// if options were requested, set them
|
||||
if (number && options) {
|
||||
std::vector<const char *> CodegenArgv(1, "libLTO");
|
||||
for (auto Arg : ArrayRef<const char *>(options, number))
|
||||
CodegenArgv.push_back(Arg);
|
||||
append_range(CodegenArgv, ArrayRef<const char *>(options, number));
|
||||
cl::ParseCommandLineOptions(CodegenArgv.size(), CodegenArgv.data());
|
||||
}
|
||||
}
|
||||
|
@ -329,9 +329,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
|
||||
WasmYAML::ElemSegment Seg;
|
||||
Seg.TableIndex = Segment.TableIndex;
|
||||
Seg.Offset = Segment.Offset;
|
||||
for (auto &Func : Segment.Functions) {
|
||||
Seg.Functions.push_back(Func);
|
||||
}
|
||||
append_range(Seg.Functions, Segment.Functions);
|
||||
ElemSec->Segments.push_back(Seg);
|
||||
}
|
||||
S = std::move(ElemSec);
|
||||
|
@ -745,14 +745,11 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
FileCheckRequest Req;
|
||||
for (StringRef Prefix : CheckPrefixes)
|
||||
Req.CheckPrefixes.push_back(Prefix);
|
||||
append_range(Req.CheckPrefixes, CheckPrefixes);
|
||||
|
||||
for (StringRef Prefix : CommentPrefixes)
|
||||
Req.CommentPrefixes.push_back(Prefix);
|
||||
append_range(Req.CommentPrefixes, CommentPrefixes);
|
||||
|
||||
for (StringRef CheckNot : ImplicitCheckNot)
|
||||
Req.ImplicitCheckNot.push_back(CheckNot);
|
||||
append_range(Req.ImplicitCheckNot, ImplicitCheckNot);
|
||||
|
||||
bool GlobalDefineError = false;
|
||||
for (StringRef G : GlobalDefines) {
|
||||
|
Loading…
Reference in New Issue
Block a user