mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[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
This commit is contained in:
parent
7dcb34e448
commit
16157b30c5
@ -92,9 +92,9 @@ std::unique_ptr<Module>
|
||||
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());
|
||||
|
@ -93,7 +93,9 @@ int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) {
|
||||
|
||||
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 @@ 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;
|
||||
}
|
||||
|
@ -821,9 +821,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
// 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 @@ int main(int argc, char **argv) {
|
||||
|
||||
// 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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user