abhina.sreeskantharajan created this revision.
Herald added subscribers: thopre, hiraditya.
abhina.sreeskantharajan requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This patch addresses some formatting changes from the comments in 
https://reviews.llvm.org/D97785.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99072

Files:
  clang/tools/arcmt-test/arcmt-test.cpp
  llvm/lib/IRReader/IRReader.cpp
  llvm/lib/TableGen/Main.cpp
  llvm/utils/FileCheck/FileCheck.cpp

Index: llvm/utils/FileCheck/FileCheck.cpp
===================================================================
--- llvm/utils/FileCheck/FileCheck.cpp
+++ llvm/utils/FileCheck/FileCheck.cpp
@@ -821,9 +821,9 @@
 
   // Read the expected strings from the check file.
   ErrorOr<std::unique_ptr<MemoryBuffer>> CheckFileOrErr =
-      MemoryBuffer::getFileOrSTDIN(CheckFilename, /*FileSize*/ -1,
-                                   /*RequiresNullTerminator*/ true,
-                                   /*IsText*/ true);
+      MemoryBuffer::getFileOrSTDIN(CheckFilename, /*FileSize=*/-1,
+                                   /*RequiresNullTerminator=*/true,
+                                   /*IsText=*/true);
   if (std::error_code EC = CheckFileOrErr.getError()) {
     errs() << "Could not open check file '" << CheckFilename
            << "': " << EC.message() << '\n';
@@ -845,9 +845,9 @@
 
   // Open the file to check and add it to SourceMgr.
   ErrorOr<std::unique_ptr<MemoryBuffer>> InputFileOrErr =
-      MemoryBuffer::getFileOrSTDIN(InputFilename, /*FileSize*/ -1,
-                                   /*RequiresNullTerminator*/ true,
-                                   /*IsText*/ true);
+      MemoryBuffer::getFileOrSTDIN(InputFilename, /*FileSize=*/-1,
+                                   /*RequiresNullTerminator=*/true,
+                                   /*IsText=*/true);
   if (InputFilename == "-")
     InputFilename = "<stdin>"; // Overwrite for improved diagnostic messages
   if (std::error_code EC = InputFileOrErr.getError()) {
Index: llvm/lib/TableGen/Main.cpp
===================================================================
--- llvm/lib/TableGen/Main.cpp
+++ llvm/lib/TableGen/Main.cpp
@@ -93,7 +93,9 @@
 
   Records.startTimer("Parse, build records");
   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
-      MemoryBuffer::getFileOrSTDIN(InputFilename, -1, true, true);
+      MemoryBuffer::getFileOrSTDIN(InputFilename, /*FileSize=*/-1,
+                                   /*RequiresNullTerminator=*/true,
+                                   /*IsText=*/true);
   if (std::error_code EC = FileOrErr.getError())
     return reportError(argv0, "Could not open input file '" + InputFilename +
                                   "': " + EC.message() + "\n");
@@ -137,8 +139,9 @@
     // Only updates the real output file if there are any differences.
     // This prevents recompilation of all the files depending on it if there
     // aren't any.
-    if (auto ExistingOrErr =
-            MemoryBuffer::getFile(OutputFilename, -1, true, false, true))
+    if (auto ExistingOrErr = MemoryBuffer::getFile(
+            OutputFilename, /*FileSize=*/-1, /*RequiresNullTerminator=*/true,
+            /*IsVolatile=*/false, /*IsText=*/true))
       if (std::move(ExistingOrErr.get())->getBuffer() == Out.str())
         WriteFile = false;
   }
Index: llvm/lib/IRReader/IRReader.cpp
===================================================================
--- llvm/lib/IRReader/IRReader.cpp
+++ llvm/lib/IRReader/IRReader.cpp
@@ -92,9 +92,9 @@
 llvm::parseIRFile(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context,
                   DataLayoutCallbackTy DataLayoutCallback) {
   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
-      MemoryBuffer::getFileOrSTDIN(Filename, /*FileSize*/ -1,
-                                   /*RequiresNullTerminator*/ true,
-                                   /*IsText*/ true);
+      MemoryBuffer::getFileOrSTDIN(Filename, /*FileSize=*/-1,
+                                   /*RequiresNullTerminator=*/true,
+                                   /*IsText=*/true);
   if (std::error_code EC = FileOrErr.getError()) {
     Err = SMDiagnostic(Filename, SourceMgr::DK_Error,
                        "Could not open input file: " + EC.message());
Index: clang/tools/arcmt-test/arcmt-test.cpp
===================================================================
--- clang/tools/arcmt-test/arcmt-test.cpp
+++ clang/tools/arcmt-test/arcmt-test.cpp
@@ -208,14 +208,14 @@
   using namespace llvm;
 
   ErrorOr<std::unique_ptr<MemoryBuffer>> file1 = MemoryBuffer::getFile(
-      fname1, /*FileSize*/ -1, /*RequiresNullTerminator*/ true,
-      /*IsVolatile*/ false, /*IsText*/ true);
+      fname1, /*FileSize=*/-1, /*RequiresNullTerminator=*/true,
+      /*IsVolatile=*/false, /*IsText=*/true);
   if (!file1)
     return false;
 
   ErrorOr<std::unique_ptr<MemoryBuffer>> file2 = MemoryBuffer::getFile(
-      fname2, /*FileSize*/ -1, /*RequiresNullTerminator*/ true,
-      /*IsVolatile*/ false, /*IsText*/ true);
+      fname2, /*FileSize=*/-1, /*RequiresNullTerminator=*/true,
+      /*IsVolatile=*/false, /*IsText=*/true);
   if (!file2)
     return false;
 
@@ -244,9 +244,9 @@
   if (RemappingsFile.empty())
     inputBuf = MemoryBuffer::getSTDIN();
   else
-    inputBuf = MemoryBuffer::getFile(RemappingsFile, /*FileSize*/ -1,
-                                     /*RequiresNullTerminator*/ true,
-                                     /*IsVolatile*/ false, /*IsText*/ true);
+    inputBuf = MemoryBuffer::getFile(RemappingsFile, /*FileSize=*/-1,
+                                     /*RequiresNullTerminator=*/true,
+                                     /*IsVolatile=*/false, /*IsText=*/true);
   if (!inputBuf) {
     errs() << "error: could not read remappings input\n";
     return true;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to