summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index b2da3c24664..85106ec98d4 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -111,10 +111,6 @@ static void handleMergeWriterError(Error E, StringRef WhenceFile = "",
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;
@@ -305,7 +301,7 @@ static WeightedFile parseWeightedFile(const StringRef &WeightedFilename) {
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>
@@ -330,7 +326,7 @@ static void addWeightedInput(WeightedFileVector &WNI, const WeightedFile &WF) {
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;
}
OpenPOWER on IntegriCloud