mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix indentation. Extracted from a patch by Sami Liedes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -71,40 +71,40 @@ static std::string getSymbolFlagStr(uint32_t Flags) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
dumpSymbol(const SymbolRef &Sym, const ObjectFile *obj, bool IsDynamic) {
|
dumpSymbol(const SymbolRef &Sym, const ObjectFile *obj, bool IsDynamic) {
|
||||||
StringRef Name;
|
StringRef Name;
|
||||||
SymbolRef::Type Type;
|
SymbolRef::Type Type;
|
||||||
uint32_t Flags;
|
uint32_t Flags;
|
||||||
uint64_t Address;
|
uint64_t Address;
|
||||||
uint64_t Size;
|
uint64_t Size;
|
||||||
uint64_t FileOffset;
|
uint64_t FileOffset;
|
||||||
Sym.getName(Name);
|
Sym.getName(Name);
|
||||||
Sym.getAddress(Address);
|
Sym.getAddress(Address);
|
||||||
Sym.getSize(Size);
|
Sym.getSize(Size);
|
||||||
Sym.getFileOffset(FileOffset);
|
Sym.getFileOffset(FileOffset);
|
||||||
Sym.getType(Type);
|
Sym.getType(Type);
|
||||||
Sym.getFlags(Flags);
|
Sym.getFlags(Flags);
|
||||||
std::string FullName = Name;
|
std::string FullName = Name;
|
||||||
|
|
||||||
// If this is a dynamic symbol from an ELF object, append
|
// If this is a dynamic symbol from an ELF object, append
|
||||||
// the symbol's version to the name.
|
// the symbol's version to the name.
|
||||||
if (IsDynamic && obj->isELF()) {
|
if (IsDynamic && obj->isELF()) {
|
||||||
StringRef Version;
|
StringRef Version;
|
||||||
bool IsDefault;
|
bool IsDefault;
|
||||||
GetELFSymbolVersion(obj, Sym, Version, IsDefault);
|
GetELFSymbolVersion(obj, Sym, Version, IsDefault);
|
||||||
if (!Version.empty()) {
|
if (!Version.empty()) {
|
||||||
FullName += (IsDefault ? "@@" : "@");
|
FullName += (IsDefault ? "@@" : "@");
|
||||||
FullName += Version;
|
FullName += Version;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// format() can't handle StringRefs
|
// format() can't handle StringRefs
|
||||||
outs() << format(" %-32s", FullName.c_str())
|
outs() << format(" %-32s", FullName.c_str())
|
||||||
<< format(" %-4s", getTypeStr(Type))
|
<< format(" %-4s", getTypeStr(Type))
|
||||||
<< format(" %16" PRIx64, Address)
|
<< format(" %16" PRIx64, Address)
|
||||||
<< format(" %16" PRIx64, Size)
|
<< format(" %16" PRIx64, Size)
|
||||||
<< format(" %16" PRIx64, FileOffset)
|
<< format(" %16" PRIx64, FileOffset)
|
||||||
<< " " << getSymbolFlagStr(Flags)
|
<< " " << getSymbolFlagStr(Flags)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate through the normal symbols in the ObjectFile
|
// Iterate through the normal symbols in the ObjectFile
|
||||||
|
Reference in New Issue
Block a user