[NFC] Reformat llvm-elfabi
authorHaowei Wu <haowei@google.com>
Wed, 11 Nov 2020 18:40:06 +0000 (10:40 -0800)
committerHaowei Wu <haowei@google.com>
Wed, 11 Nov 2020 18:41:51 +0000 (10:41 -0800)
Makes diff in next commit more readable.

llvm/tools/llvm-elfabi/ErrorCollector.cpp
llvm/tools/llvm-elfabi/llvm-elfabi.cpp

index debb55e..a52aeff 100644 (file)
@@ -16,9 +16,7 @@
 using namespace llvm;
 using namespace llvm::elfabi;
 
-void ErrorCollector::escalateToFatal() {
-  ErrorsAreFatal = true;
-}
+void ErrorCollector::escalateToFatal() { ErrorsAreFatal = true; }
 
 void ErrorCollector::addError(Error &&Err, StringRef Tag) {
   if (Err) {
@@ -48,9 +46,7 @@ void ErrorCollector::log(raw_ostream &OS) {
   }
 }
 
-bool ErrorCollector::allErrorsHandled() const {
-  return Errors.empty();
-}
+bool ErrorCollector::allErrorsHandled() const { return Errors.empty(); }
 
 ErrorCollector::~ErrorCollector() {
   if (ErrorsAreFatal && !allErrorsHandled())
index 8bf2ad4..4e34de8 100644 (file)
 namespace llvm {
 namespace elfabi {
 
-enum class FileFormat {
-  TBE,
-  ELF
-};
+enum class FileFormat { TBE, ELF };
 
 } // end namespace elfabi
 } // end namespace llvm
@@ -35,20 +32,20 @@ using namespace llvm::elfabi;
 // Command line flags:
 cl::opt<FileFormat> InputFileFormat(
     cl::desc("Force input file format:"),
-    cl::values(clEnumValN(FileFormat::TBE,
-                          "tbe", "Read `input` as text-based ELF stub"),
-               clEnumValN(FileFormat::ELF,
-                          "elf", "Read `input` as ELF binary")));
+    cl::values(clEnumValN(FileFormat::TBE, "tbe",
+                          "Read `input` as text-based ELF stub"),
+               clEnumValN(FileFormat::ELF, "elf",
+                          "Read `input` as ELF binary")));
 cl::opt<std::string> InputFilePath(cl::Positional, cl::desc("input"),
                                    cl::Required);
 cl::opt<std::string>
     EmitTBE("emit-tbe",
             cl::desc("Emit a text-based ELF stub (.tbe) from the input file"),
             cl::value_desc("path"));
-cl::opt<std::string> SOName(
-    "soname",
-    cl::desc("Manually set the DT_SONAME entry of any emitted files"),
-    cl::value_desc("name"));
+cl::opt<std::string>
+    SOName("soname",
+           cl::desc("Manually set the DT_SONAME entry of any emitted files"),
+           cl::value_desc("name"));
 
 /// writeTBE() writes a Text-Based ELF stub to a file using the latest version
 /// of the YAML parser.