diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp index 9780443fb85a2b..2e52ef9a07fee2 100644 --- a/lld/MachO/Driver.cpp +++ b/lld/MachO/Driver.cpp @@ -75,7 +75,7 @@ static HeaderFileType getOutputType(const opt::InputArgList &args) { static Optional findAlongPathsWithExtensions(StringRef name, ArrayRef 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 findLibrary(StringRef name) { } static Optional 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 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 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(treatmentStr) + StringSwitch(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 argsArr, bool canExitEarly, +bool macho::link(ArrayRef argsArr, bool canExitEarly, raw_ostream &stdoutOS, raw_ostream &stderrOS) { lld::stdoutOS = &stdoutOS; lld::stderrOS = &stderrOS; @@ -762,11 +762,11 @@ bool macho::link(llvm::ArrayRef 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 e2282f1fb2bb2b..3d4d98b5160670 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 &&f) +ArchiveFile::ArchiveFile(std::unique_ptr &&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 9e74b69ff1ecac..7554693f15e450 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(createConfig(), backend); } diff --git a/lld/MachO/OutputSegment.cpp b/lld/MachO/OutputSegment.cpp index a13f9f8252e4fe..c00e819ea3a46c 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 nameToOutputSegment; +static DenseMap nameToOutputSegment; std::vector macho::outputSegments; OutputSegment *macho::getOrCreateOutputSegment(StringRef name) { diff --git a/lld/MachO/SymbolTable.cpp b/lld/MachO/SymbolTable.cpp index 8a490083ebf1b3..2f0844fadaaade 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);