[llvm-commits] [llvm] r171300 - /llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
Rafael Espindola
rafael.espindola at gmail.com
Mon Dec 31 07:30:58 PST 2012
Author: rafael
Date: Mon Dec 31 09:30:58 2012
New Revision: 171300
URL: http://llvm.org/viewvc/llvm-project?rev=171300&view=rev
Log:
Fix indentation. Extracted from a patch by Sami Liedes!
Modified:
llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
Modified: llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp?rev=171300&r1=171299&r2=171300&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp Mon Dec 31 09:30:58 2012
@@ -71,40 +71,40 @@
static void
dumpSymbol(const SymbolRef &Sym, const ObjectFile *obj, bool IsDynamic) {
- StringRef Name;
- SymbolRef::Type Type;
- uint32_t Flags;
- uint64_t Address;
- uint64_t Size;
- uint64_t FileOffset;
- Sym.getName(Name);
- Sym.getAddress(Address);
- Sym.getSize(Size);
- Sym.getFileOffset(FileOffset);
- Sym.getType(Type);
- Sym.getFlags(Flags);
- std::string FullName = Name;
-
- // If this is a dynamic symbol from an ELF object, append
- // the symbol's version to the name.
- if (IsDynamic && obj->isELF()) {
- StringRef Version;
- bool IsDefault;
- GetELFSymbolVersion(obj, Sym, Version, IsDefault);
- if (!Version.empty()) {
- FullName += (IsDefault ? "@@" : "@");
- FullName += Version;
- }
+ StringRef Name;
+ SymbolRef::Type Type;
+ uint32_t Flags;
+ uint64_t Address;
+ uint64_t Size;
+ uint64_t FileOffset;
+ Sym.getName(Name);
+ Sym.getAddress(Address);
+ Sym.getSize(Size);
+ Sym.getFileOffset(FileOffset);
+ Sym.getType(Type);
+ Sym.getFlags(Flags);
+ std::string FullName = Name;
+
+ // If this is a dynamic symbol from an ELF object, append
+ // the symbol's version to the name.
+ if (IsDynamic && obj->isELF()) {
+ StringRef Version;
+ bool IsDefault;
+ GetELFSymbolVersion(obj, Sym, Version, IsDefault);
+ if (!Version.empty()) {
+ FullName += (IsDefault ? "@@" : "@");
+ FullName += Version;
}
+ }
- // format() can't handle StringRefs
- outs() << format(" %-32s", FullName.c_str())
- << format(" %-4s", getTypeStr(Type))
- << format(" %16" PRIx64, Address)
- << format(" %16" PRIx64, Size)
- << format(" %16" PRIx64, FileOffset)
- << " " << getSymbolFlagStr(Flags)
- << "\n";
+ // format() can't handle StringRefs
+ outs() << format(" %-32s", FullName.c_str())
+ << format(" %-4s", getTypeStr(Type))
+ << format(" %16" PRIx64, Address)
+ << format(" %16" PRIx64, Size)
+ << format(" %16" PRIx64, FileOffset)
+ << " " << getSymbolFlagStr(Flags)
+ << "\n";
}
// Iterate through the normal symbols in the ObjectFile
More information about the llvm-commits
mailing list