summaryrefslogtreecommitdiff
path: root/ELF/MapFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/MapFile.cpp')
-rw-r--r--ELF/MapFile.cpp18
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