From: Abhina Sreeskantharajan Date: Tue, 23 Mar 2021 11:17:33 +0000 (-0400) Subject: [NFC] Formatting changes X-Git-Tag: llvmorg-14-init~11568 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a234d0319891ae25cdf020dc32bce1c37c0e9867;p=platform%2Fupstream%2Fllvm.git [NFC] Formatting changes This patch addresses some formatting changes from the comments in https://reviews.llvm.org/D97785. Reviewed By: anirudhp Differential Revision: https://reviews.llvm.org/D99072 --- diff --git a/clang/tools/arcmt-test/arcmt-test.cpp b/clang/tools/arcmt-test/arcmt-test.cpp index e4764ad..778587d 100644 --- a/clang/tools/arcmt-test/arcmt-test.cpp +++ b/clang/tools/arcmt-test/arcmt-test.cpp @@ -208,14 +208,14 @@ static bool filesCompareEqual(StringRef fname1, StringRef fname2) { using namespace llvm; ErrorOr> 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> 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 @@ static bool verifyTransformedFiles(ArrayRef resultFiles) { 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; diff --git a/llvm/lib/IRReader/IRReader.cpp b/llvm/lib/IRReader/IRReader.cpp index 69757a5..cc3b206 100644 --- a/llvm/lib/IRReader/IRReader.cpp +++ b/llvm/lib/IRReader/IRReader.cpp @@ -92,9 +92,9 @@ std::unique_ptr llvm::parseIRFile(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, DataLayoutCallbackTy DataLayoutCallback) { ErrorOr> 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()); diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp index 75f4d42..289af93 100644 --- a/llvm/lib/TableGen/Main.cpp +++ b/llvm/lib/TableGen/Main.cpp @@ -93,7 +93,9 @@ int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) { Records.startTimer("Parse, build records"); ErrorOr> 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 @@ int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) { // 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; } diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 0ee105d..12365e0 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -821,9 +821,9 @@ int main(int argc, char **argv) { // Read the expected strings from the check file. ErrorOr> 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 @@ int main(int argc, char **argv) { // Open the file to check and add it to SourceMgr. ErrorOr> InputFileOrErr = - MemoryBuffer::getFileOrSTDIN(InputFilename, /*FileSize*/ -1, - /*RequiresNullTerminator*/ true, - /*IsText*/ true); + MemoryBuffer::getFileOrSTDIN(InputFilename, /*FileSize=*/-1, + /*RequiresNullTerminator=*/true, + /*IsText=*/true); if (InputFilename == "-") InputFilename = ""; // Overwrite for improved diagnostic messages if (std::error_code EC = InputFileOrErr.getError()) {