struct WeightedFile {
std::string Filename;
uint64_t Weight;
-
- WeightedFile() {}
-
- WeightedFile(const std::string &F, uint64_t W) : Filename{F}, Weight{W} {}
};
typedef SmallVector<WeightedFile, 5> WeightedFileVector;
if (WeightStr.getAsInteger(10, Weight) || Weight < 1)
exitWithError("Input weight must be a positive integer.");
- return WeightedFile(FileName, Weight);
+ return {FileName, Weight};
}
static std::unique_ptr<MemoryBuffer>
Filename);
// If it's a source file, collect it.
if (llvm::sys::fs::is_regular_file(Status)) {
- WNI.emplace_back(Filename, Weight);
+ WNI.push_back({Filename, Weight});
return;
}