Fix: Reordering parameters in getFile and getFileOrSTDIN
authorAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>
Thu, 25 Mar 2021 15:55:30 +0000 (11:55 -0400)
committerAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>
Thu, 25 Mar 2021 15:55:57 +0000 (11:55 -0400)
There was a new getFileOrSTDIN call added recently which was not included in my patch. https://reviews.llvm.org/D99110
I reordered the args to match the new order.

Reviewed By: tunz

Differential Revision: https://reviews.llvm.org/D99349

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

index 1958e31..f813946 100644 (file)
@@ -329,7 +329,7 @@ CoverageMapping::load(ArrayRef<StringRef> ObjectFilenames,
 
   for (const auto &File : llvm::enumerate(ObjectFilenames)) {
     auto CovMappingBufOrErr = MemoryBuffer::getFileOrSTDIN(
-        File.value(), /*FileSize=*/-1, /*RequiresNullTerminator=*/false);
+        File.value(), /*IsText=*/false, /*RequiresNullTerminator=*/false);
     if (std::error_code EC = CovMappingBufOrErr.getError())
       return errorCodeToError(EC);
     StringRef Arch = Arches.empty() ? StringRef() : Arches[File.index()];