summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-04-28 18:54:08 +0000
committerRui Ueyama <ruiu@google.com>2017-04-28 18:54:08 +0000
commit72408fb2ac313288856c52e613274cbe321dd48e (patch)
treea283c480dfed091cd373c619a7ae388629b402f8
parenta6b6dcc12384359b0e9a5843ec8e69ff3dc28009 (diff)
downloadbcm5719-llvm-72408fb2ac313288856c52e613274cbe321dd48e.tar.gz
bcm5719-llvm-72408fb2ac313288856c52e613274cbe321dd48e.zip
Remove trailing whitespace from the -Map output.
If a string is shorter than 7 characters, we used to print out trailing whitespace characters. llvm-svn: 301668
-rw-r--r--lld/ELF/MapFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index 7720ea86a69..9a346a18de3 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -98,7 +98,7 @@ template <class ELFT> PrettyPrinter<ELFT>::PrettyPrinter() {
raw_string_ostream OS(Str[I]);
writeHeader<ELFT>(OS, Syms[I]->getVA(), Syms[I]->template getSize<ELFT>(),
0);
- OS << indent(3) << left_justify(toString(*Syms[I]), 7) << '\n';
+ OS << indent(3) << toString(*Syms[I]) << '\n';
});
for (size_t I = 0, E = Syms.size(); I < E; ++I)
SymStr[Syms[I]] = std::move(Str[I]);
@@ -120,7 +120,7 @@ void PrettyPrinter<ELFT>::writeInputSection(raw_ostream &OS,
if (IS->Name != CurSection) {
writeHeader<ELFT>(OS, IS->OutSec->Addr + IS->OutSecOff, IS->getSize(),
IS->Alignment);
- OS << indent(1) << left_justify(IS->Name, 7) << '\n';
+ OS << indent(1) << IS->Name << '\n';
CurSection = IS->Name;
}
@@ -131,7 +131,7 @@ void PrettyPrinter<ELFT>::writeInputSection(raw_ostream &OS,
writeHeader<ELFT>(OS, IS->OutSec->Addr + IS->OutSecOff, IS->getSize(),
IS->Alignment);
- OS << indent(2) << left_justify(toString(File), 7) << '\n';
+ OS << indent(2) << toString(File) << '\n';
for (DefinedRegular *Sym : Symbols[IS])
OS << SymStr[Sym];
@@ -148,7 +148,7 @@ void PrettyPrinter<ELFT>::print(raw_ostream &OS,
// Print out a mapfile.
for (OutputSection *Sec : OutputSections) {
writeHeader<ELFT>(OS, Sec->Addr, Sec->Size, Sec->Alignment);
- OS << left_justify(Sec->Name, 7) << '\n';
+ OS << Sec->Name << '\n';
StringRef CurSection;
for (InputSection *IS : Sec->Sections)
OpenPOWER on IntegriCloud