diff options
author | Jake Ehrlich <jakehehrlich@google.com> | 2017-12-15 20:17:55 +0000 |
---|---|---|
committer | Jake Ehrlich <jakehehrlich@google.com> | 2017-12-15 20:17:55 +0000 |
commit | 777fb00a761d5b4056dd58fb00b60a9d57927256 (patch) | |
tree | 1c911e51f0570ef157aa4e3d2982f0f057e9daf3 /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | 29832a6c8b739225d53e621d0dbcc44ff1f22d2a (diff) | |
download | bcm5719-llvm-777fb00a761d5b4056dd58fb00b60a9d57927256.tar.gz bcm5719-llvm-777fb00a761d5b4056dd58fb00b60a9d57927256.zip |
[llvm-objcopy] Reformat everything using clang-format -i
Overtime some non-clang formatted code has creeped into llvm-objcopy. This
patch fixes all of that.
Differential Revision: https://reviews.llvm.org/D41262
llvm-svn: 320856
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r-- | llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp index 615667bf99a..9d60ae42639 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp @@ -73,7 +73,7 @@ LLVM_ATTRIBUTE_NORETURN void reportError(StringRef File, Error E) { static cl::opt<std::string> InputFilename(cl::Positional, cl::desc("<input>")); static cl::opt<std::string> OutputFilename(cl::Positional, cl::desc("<output>"), - cl::init("-")); + cl::init("-")); static cl::opt<std::string> OutputFormat("O", cl::desc("Set output format to one of the following:" "\n\tbinary")); @@ -100,8 +100,9 @@ static cl::opt<bool> StripDebug("strip-debug", cl::desc("Removes all debug information")); static cl::opt<bool> StripSections("strip-sections", cl::desc("Remove all section headers")); -static cl::opt<bool> StripNonAlloc("strip-non-alloc", - cl::desc("Remove all non-allocated sections")); +static cl::opt<bool> + StripNonAlloc("strip-non-alloc", + cl::desc("Remove all non-allocated sections")); static cl::opt<bool> StripDWO("strip-dwo", cl::desc("Remove all DWARF .dwo sections from file")); static cl::opt<bool> ExtractDWO( @@ -115,9 +116,7 @@ static cl::opt<std::string> using SectionPred = std::function<bool(const SectionBase &Sec)>; -bool IsDWOSection(const SectionBase &Sec) { - return Sec.Name.endswith(".dwo"); -} +bool IsDWOSection(const SectionBase &Sec) { return Sec.Name.endswith(".dwo"); } template <class ELFT> bool OnlyKeepDWOPred(const Object<ELFT> &Obj, const SectionBase &Sec) { @@ -164,8 +163,7 @@ void SplitDWOToFile(const ELFObjectFile<ELFT> &ObjFile, StringRef File) { // any previous removals. Lastly whether or not something is removed shouldn't // depend a) on the order the options occur in or b) on some opaque priority // system. The only priority is that keeps/copies overrule removes. -template <class ELFT> -void CopyBinary(const ELFObjectFile<ELFT> &ObjFile) { +template <class ELFT> void CopyBinary(const ELFObjectFile<ELFT> &ObjFile) { std::unique_ptr<Object<ELFT>> Obj; if (!OutputFormat.empty() && OutputFormat != "binary") @@ -176,7 +174,7 @@ void CopyBinary(const ELFObjectFile<ELFT> &ObjFile) { Obj = llvm::make_unique<ELFObject<ELFT>>(ObjFile); if (!SplitDWO.empty()) - SplitDWOToFile<ELFT>(ObjFile, SplitDWO.getValue()); + SplitDWOToFile<ELFT>(ObjFile, SplitDWO.getValue()); SectionPred RemovePred = [](const SectionBase &) { return false; }; @@ -207,7 +205,7 @@ void CopyBinary(const ELFObjectFile<ELFT> &ObjFile) { return false; if (&Sec == Obj->getSectionHeaderStrTab()) return false; - switch(Sec.Type) { + switch (Sec.Type) { case SHT_SYMTAB: case SHT_REL: case SHT_RELA: |