[lld] e98b441 - [lld-macho] Remove unnecessary llvm:: namespace prefixes
Jez Ng via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 9 09:44:55 PST 2021
Author: Jez Ng
Date: 2021-01-09T12:44:35-05:00
New Revision: e98b441a09fac0a8419fee15afc725758390ca2a
URL: https://github.com/llvm/llvm-project/commit/e98b441a09fac0a8419fee15afc725758390ca2a
DIFF: https://github.com/llvm/llvm-project/commit/e98b441a09fac0a8419fee15afc725758390ca2a.diff
LOG: [lld-macho] Remove unnecessary llvm:: namespace prefixes
Added:
Modified:
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/LTO.cpp
lld/MachO/OutputSegment.cpp
lld/MachO/SymbolTable.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 9780443fb85a..2e52ef9a07fe 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -75,7 +75,7 @@ static HeaderFileType getOutputType(const opt::InputArgList &args) {
static Optional<std::string>
findAlongPathsWithExtensions(StringRef name, ArrayRef<StringRef> extensions) {
- llvm::SmallString<261> base;
+ SmallString<261> base;
for (StringRef dir : config->librarySearchPaths) {
base = dir;
path::append(base, Twine("lib") + name);
@@ -99,7 +99,7 @@ static Optional<std::string> findLibrary(StringRef name) {
}
static Optional<std::string> findFramework(StringRef name) {
- llvm::SmallString<260> symlink;
+ SmallString<260> symlink;
StringRef suffix;
std::tie(name, suffix) = name.split(",");
for (StringRef dir : config->frameworkSearchPaths) {
@@ -109,7 +109,7 @@ static Optional<std::string> findFramework(StringRef name) {
if (!suffix.empty()) {
// NOTE: we must resolve the symlink before trying the suffixes, because
// there are no symlinks for the suffixed paths.
- llvm::SmallString<260> location;
+ SmallString<260> location;
if (!fs::real_path(symlink, location)) {
// only append suffix if realpath() succeeds
Twine suffixed = location + suffix;
@@ -127,11 +127,11 @@ static Optional<std::string> findFramework(StringRef name) {
static TargetInfo *createTargetInfo(opt::InputArgList &args) {
StringRef arch = args.getLastArgValue(OPT_arch, "x86_64");
- config->arch = llvm::MachO::getArchitectureFromName(
+ config->arch = MachO::getArchitectureFromName(
args.getLastArgValue(OPT_arch, arch));
switch (config->arch) {
- case llvm::MachO::AK_x86_64:
- case llvm::MachO::AK_x86_64h:
+ case MachO::AK_x86_64:
+ case MachO::AK_x86_64h:
return createX86_64TargetInfo();
default:
fatal("missing or unsupported -arch " + arch);
@@ -575,7 +575,7 @@ static void handlePlatformVersion(const opt::Arg *arg) {
static void handleUndefined(const opt::Arg *arg) {
StringRef treatmentStr = arg->getValue(0);
config->undefinedSymbolTreatment =
- llvm::StringSwitch<UndefinedSymbolTreatment>(treatmentStr)
+ StringSwitch<UndefinedSymbolTreatment>(treatmentStr)
.Case("error", UndefinedSymbolTreatment::error)
.Case("warning", UndefinedSymbolTreatment::warning)
.Case("suppress", UndefinedSymbolTreatment::suppress)
@@ -677,7 +677,7 @@ static uint32_t parseDylibVersion(const opt::ArgList& args, unsigned id) {
return version.rawValue();
}
-bool macho::link(llvm::ArrayRef<const char *> argsArr, bool canExitEarly,
+bool macho::link(ArrayRef<const char *> argsArr, bool canExitEarly,
raw_ostream &stdoutOS, raw_ostream &stderrOS) {
lld::stdoutOS = &stdoutOS;
lld::stderrOS = &stderrOS;
@@ -762,11 +762,11 @@ bool macho::link(llvm::ArrayRef<const char *> argsArr, bool canExitEarly,
message(getLLDVersion());
message(StringRef("Library search paths:") +
(config->librarySearchPaths.size()
- ? "\n\t" + llvm::join(config->librarySearchPaths, "\n\t")
+ ? "\n\t" + join(config->librarySearchPaths, "\n\t")
: ""));
message(StringRef("Framework search paths:") +
(config->frameworkSearchPaths.size()
- ? "\n\t" + llvm::join(config->frameworkSearchPaths, "\n\t")
+ ? "\n\t" + join(config->frameworkSearchPaths, "\n\t")
: ""));
freeArena();
return !errorCount();
diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index e2282f1fb2bb..3d4d98b51606 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -664,7 +664,7 @@ DylibFile::DylibFile(const InterfaceFile &interface, DylibFile *umbrella)
currentTopLevelTapi = nullptr;
}
-ArchiveFile::ArchiveFile(std::unique_ptr<llvm::object::Archive> &&f)
+ArchiveFile::ArchiveFile(std::unique_ptr<object::Archive> &&f)
: InputFile(ArchiveKind, f->getMemoryBufferRef()), file(std::move(f)) {
for (const object::Archive::Symbol &sym : file->symbols())
symtab->addLazy(sym.getName(), this, sym);
diff --git a/lld/MachO/LTO.cpp b/lld/MachO/LTO.cpp
index 9e74b69ff1ec..7554693f15e4 100644
--- a/lld/MachO/LTO.cpp
+++ b/lld/MachO/LTO.cpp
@@ -35,7 +35,7 @@ static lto::Config createConfig() {
BitcodeCompiler::BitcodeCompiler() {
auto backend =
- lto::createInProcessThinBackend(llvm::heavyweight_hardware_concurrency());
+ lto::createInProcessThinBackend(heavyweight_hardware_concurrency());
ltoObj = std::make_unique<lto::LTO>(createConfig(), backend);
}
diff --git a/lld/MachO/OutputSegment.cpp b/lld/MachO/OutputSegment.cpp
index a13f9f8252e4..c00e819ea3a4 100644
--- a/lld/MachO/OutputSegment.cpp
+++ b/lld/MachO/OutputSegment.cpp
@@ -49,7 +49,7 @@ void OutputSegment::addOutputSection(OutputSection *osec) {
sections.push_back(osec);
}
-static llvm::DenseMap<StringRef, OutputSegment *> nameToOutputSegment;
+static DenseMap<StringRef, OutputSegment *> nameToOutputSegment;
std::vector<OutputSegment *> macho::outputSegments;
OutputSegment *macho::getOrCreateOutputSegment(StringRef name) {
diff --git a/lld/MachO/SymbolTable.cpp b/lld/MachO/SymbolTable.cpp
index 8a490083ebf1..2f0844fadaaa 100644
--- a/lld/MachO/SymbolTable.cpp
+++ b/lld/MachO/SymbolTable.cpp
@@ -18,7 +18,7 @@ using namespace lld;
using namespace lld::macho;
Symbol *SymbolTable::find(StringRef name) {
- auto it = symMap.find(llvm::CachedHashStringRef(name));
+ auto it = symMap.find(CachedHashStringRef(name));
if (it == symMap.end())
return nullptr;
return symVector[it->second];
@@ -135,7 +135,7 @@ Symbol *SymbolTable::addDylib(StringRef name, DylibFile *file, bool isWeakDef,
}
Symbol *SymbolTable::addLazy(StringRef name, ArchiveFile *file,
- const llvm::object::Archive::Symbol &sym) {
+ const object::Archive::Symbol &sym) {
Symbol *s;
bool wasInserted;
std::tie(s, wasInserted) = insert(name);
More information about the llvm-commits
mailing list