summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-03-20 06:29:02 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-03-20 06:29:02 +0000
commit798e548955556eef47820910174118abbfa933e3 (patch)
treeb2336f9c8ba1fc7188027a37c84dd1f4874b57e5 /llvm/tools
parented98b68ed841abe6a7de08402a84f76d2cf29a89 (diff)
downloadbcm5719-llvm-798e548955556eef47820910174118abbfa933e3.tar.gz
bcm5719-llvm-798e548955556eef47820910174118abbfa933e3.zip
Object: Output .file symbols properly
obj2yaml would emit the NUL bytes padding the auxiliary file symbol records. Trimming them looks nicer. llvm-svn: 204314
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/obj2yaml/coff2yaml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/obj2yaml/coff2yaml.cpp b/llvm/tools/obj2yaml/coff2yaml.cpp
index 1542506e5f9..ef709222a17 100644
--- a/llvm/tools/obj2yaml/coff2yaml.cpp
+++ b/llvm/tools/obj2yaml/coff2yaml.cpp
@@ -178,7 +178,8 @@ void COFFDumper::dumpSymbols(unsigned NumSymbols) {
} else if (Symbol->isFileRecord()) {
// This symbol represents a file record.
Sym.File = StringRef(reinterpret_cast<const char *>(AuxData.data()),
- Symbol->NumberOfAuxSymbols * COFF::SymbolSize);
+ Symbol->NumberOfAuxSymbols * COFF::SymbolSize)
+ .rtrim(StringRef("\0", /*length=*/1));
} else if (Symbol->isSectionDefinition()) {
// This symbol represents a section definition.
assert(Symbol->NumberOfAuxSymbols == 1 &&
OpenPOWER on IntegriCloud