aboutsummaryrefslogtreecommitdiff
path: root/COFF/MapFile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:45 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:45 +0000
commitd2bd9e70b16db88a7808ee2280b0a107afbfdd3b (patch)
tree12612d2c593445b297ac656911c9db7cf9065bdd /COFF/MapFile.cpp
parentf1e1c239e31b467e17f1648b1f524fc9ab5b431a (diff)
Vendor import of stripped lld trunk r375505, the last commit before thevendor/lld/lld-trunk-r375505vendor/lld
upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/lld/trunk@375505
Notes
Notes: svn path=/vendor/lld/dist/; revision=353950 svn path=/vendor/lld/lld-r375505/; revision=353951; tag=vendor/lld/lld-trunk-r375505
Diffstat (limited to 'COFF/MapFile.cpp')
-rw-r--r--COFF/MapFile.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/COFF/MapFile.cpp b/COFF/MapFile.cpp
index f98cf8fa6130..0fea60aab99b 100644
--- a/COFF/MapFile.cpp
+++ b/COFF/MapFile.cpp
@@ -29,14 +29,14 @@
using namespace llvm;
using namespace llvm::object;
-using namespace lld;
-using namespace lld::coff;
+namespace lld {
+namespace coff {
using SymbolMapTy =
DenseMap<const SectionChunk *, SmallVector<DefinedRegular *, 4>>;
-static const std::string indent8 = " "; // 8 spaces
-static const std::string indent16 = " "; // 16 spaces
+static constexpr char indent8[] = " "; // 8 spaces
+static constexpr char indent16[] = " "; // 16 spaces
// Print out the first three columns of a line.
static void writeHeader(raw_ostream &os, uint64_t addr, uint64_t size,
@@ -87,12 +87,12 @@ getSymbolStrings(ArrayRef<DefinedRegular *> syms) {
return ret;
}
-void coff::writeMapFile(ArrayRef<OutputSection *> outputSections) {
+void writeMapFile(ArrayRef<OutputSection *> outputSections) {
if (config->mapFile.empty())
return;
std::error_code ec;
- raw_fd_ostream os(config->mapFile, ec, sys::fs::F_None);
+ raw_fd_ostream os(config->mapFile, ec, sys::fs::OF_None);
if (ec)
fatal("cannot open " + config->mapFile + ": " + ec.message());
@@ -122,3 +122,6 @@ void coff::writeMapFile(ArrayRef<OutputSection *> outputSections) {
}
}
}
+
+} // namespace coff
+} // namespace lld