diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:45 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:45 +0000 |
commit | d2bd9e70b16db88a7808ee2280b0a107afbfdd3b (patch) | |
tree | 12612d2c593445b297ac656911c9db7cf9065bdd /ELF/MapFile.cpp | |
parent | f1e1c239e31b467e17f1648b1f524fc9ab5b431a (diff) |
Notes
Diffstat (limited to 'ELF/MapFile.cpp')
-rw-r--r-- | ELF/MapFile.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ELF/MapFile.cpp b/ELF/MapFile.cpp index a4a6238fc6557..4d76e22f37f5f 100644 --- a/ELF/MapFile.cpp +++ b/ELF/MapFile.cpp @@ -34,13 +34,12 @@ using namespace llvm; using namespace llvm::object; -using namespace lld; -using namespace lld::elf; - +namespace lld { +namespace elf { using SymbolMapTy = DenseMap<const SectionBase *, SmallVector<Defined *, 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 vma, uint64_t lma, @@ -139,13 +138,13 @@ static void printEhFrame(raw_ostream &os, const EhFrameSection *sec) { } } -void elf::writeMapFile() { +void writeMapFile() { if (config->mapFile.empty()) return; // Open a map file for writing. 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) { error("cannot open " + config->mapFile + ": " + ec.message()); return; @@ -228,7 +227,7 @@ static void print(StringRef a, StringRef b) { // // In this case, strlen is defined by libc.so.6 and used by other two // files. -void elf::writeCrossReferenceTable() { +void writeCrossReferenceTable() { if (!config->cref) return; @@ -259,3 +258,6 @@ void elf::writeCrossReferenceTable() { print("", toString(file)); } } + +} // namespace elf +} // namespace lld |