[llvm] r276284 - [profdata] Remove constructor that MSVC 2013 pretends to not understand.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 07:29:11 PDT 2016


Author: d0k
Date: Thu Jul 21 09:29:11 2016
New Revision: 276284

URL: http://llvm.org/viewvc/llvm-project?rev=276284&view=rev
Log:
[profdata] Remove constructor that MSVC 2013 pretends to not understand.

No functionality change intended.

Modified:
    llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp

Modified: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=276284&r1=276283&r2=276284&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp (original)
+++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp Thu Jul 21 09:29:11 2016
@@ -111,10 +111,6 @@ static void handleMergeWriterError(Error
 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(co
   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(WeightedFil
                       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;
   }
 




More information about the llvm-commits mailing list