1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

[tools] Use llvm::append_range (NFC)

This commit is contained in:
Kazu Hirata 2021-01-05 21:15:56 -08:00
parent f0d6cc1d99
commit b753882cc3
7 changed files with 7 additions and 12 deletions

View File

@ -495,7 +495,7 @@ Expected<int> LLC::ExecuteProgram(const std::string &Bitcode,
return std::move(E);
std::vector<std::string> CCArgs(ArgsForCC);
CCArgs.insert(CCArgs.end(), SharedLibs.begin(), SharedLibs.end());
llvm::append_range(CCArgs, SharedLibs);
// Assuming LLC worked, compile the result with CC and run it.
return cc->ExecuteProgram(OutputAsmFile, Args, *FileKind, InputFile,

View File

@ -62,8 +62,7 @@ int main(int argc, char **argv) {
errorOrToExpected(MemoryBuffer::getFileOrSTDIN(InputFilename)));
std::vector<BitcodeModule> Mods = ExitOnErr(getBitcodeModuleList(*MB));
for (auto &BitcodeMod : Mods) {
Buffer.insert(Buffer.end(), BitcodeMod.getBuffer().begin(),
BitcodeMod.getBuffer().end());
llvm::append_range(Buffer, BitcodeMod.getBuffer());
Writer.copyStrtab(BitcodeMod.getStrtab());
}
}

View File

@ -670,7 +670,7 @@ int main(int argc, char **argv) {
std::vector<std::string> Objects;
for (const auto &F : InputFilenames) {
auto Objs = expandBundle(F);
Objects.insert(Objects.end(), Objs.begin(), Objs.end());
llvm::append_range(Objects, Objs);
}
bool Success = true;

View File

@ -182,9 +182,7 @@ Expected<InstructionBenchmark> BenchmarkRunner::runConfiguration(
const ExecutableFunction EF(State.createTargetMachine(),
getObjectFromBuffer(OS.str()));
const auto FnBytes = EF.getFunctionBytes();
InstrBenchmark.AssembledSnippet.insert(
InstrBenchmark.AssembledSnippet.end(), FnBytes.begin(),
FnBytes.end());
llvm::append_range(InstrBenchmark.AssembledSnippet, FnBytes);
}
// Assemble NumRepetitions instructions repetitions of the snippet for

View File

@ -416,7 +416,7 @@ static llvm::Error convertFileToGSYM(raw_ostream &OS) {
OS << "Input file: " << ConvertFilename << "\n";
auto Objs = expandBundle(ConvertFilename);
Objects.insert(Objects.end(), Objs.begin(), Objs.end());
llvm::append_range(Objects, Objs);
for (auto Object : Objects) {
if (auto Err = handleFileConversionToGSYM(Object, OutFile))

View File

@ -315,8 +315,7 @@ protected:
Type::getFloatTy(Context),
Type::getDoubleTy(Context)
});
ScalarTypes.insert(ScalarTypes.end(),
AdditionalScalarTypes.begin(), AdditionalScalarTypes.end());
llvm::append_range(ScalarTypes, AdditionalScalarTypes);
}
return ScalarTypes[getRandom() % ScalarTypes.size()];

View File

@ -312,8 +312,7 @@ void GraphRenderer::calculateVertexStatistics() {
if (V.first != 0) {
for (auto &E : G.inEdges(V.first)) {
auto &A = E.second;
TempTimings.insert(TempTimings.end(), A.Timings.begin(),
A.Timings.end());
llvm::append_range(TempTimings, A.Timings);
}
getStats(TempTimings.begin(), TempTimings.end(), G[V.first].S);
updateMaxStats(G[V.first].S, G.GraphVertexMax);