diff options
Diffstat (limited to 'gnu/llvm/lld/lib')
7 files changed, 10 insertions, 16 deletions
diff --git a/gnu/llvm/lld/lib/Core/CMakeLists.txt b/gnu/llvm/lld/lib/Core/CMakeLists.txt index 2d4d9ded088..d5e507536b7 100644 --- a/gnu/llvm/lld/lib/Core/CMakeLists.txt +++ b/gnu/llvm/lld/lib/Core/CMakeLists.txt @@ -1,7 +1,3 @@ -if(NOT LLD_BUILT_STANDALONE) - set(tablegen_deps intrinsics_gen) -endif() - add_lld_library(lldCore DefinedAtom.cpp Error.cpp @@ -24,5 +20,5 @@ add_lld_library(lldCore ${LLVM_PTHREAD_LIB} DEPENDS - ${tablegen_deps} + intrinsics_gen ) diff --git a/gnu/llvm/lld/lib/Driver/DarwinLdDriver.cpp b/gnu/llvm/lld/lib/Driver/DarwinLdDriver.cpp index 1a57def4ebb..21d12572619 100644 --- a/gnu/llvm/lld/lib/Driver/DarwinLdDriver.cpp +++ b/gnu/llvm/lld/lib/Driver/DarwinLdDriver.cpp @@ -293,7 +293,7 @@ static llvm::Error loadFileList(StringRef fileListPath, /// Parse number assuming it is base 16, but allow 0x prefix. static bool parseNumberBase16(StringRef numStr, uint64_t &baseAddress) { - if (numStr.startswith_lower("0x")) + if (numStr.startswith_insensitive("0x")) numStr = numStr.drop_front(2); return numStr.getAsInteger(16, baseAddress); } @@ -307,6 +307,7 @@ static void parseLLVMOptions(const LinkingContext &ctx) { for (unsigned i = 0; i != numArgs; ++i) args[i + 1] = ctx.llvmOptions()[i]; args[numArgs + 1] = nullptr; + llvm::cl::ResetAllOptionOccurrences(); llvm::cl::ParseCommandLineOptions(numArgs + 1, args); } } @@ -382,7 +383,7 @@ bool parse(llvm::ArrayRef<const char *> args, MachOLinkingContext &ctx) { !parsedArgs.getLastArg(OPT_test_file_usage)) { // If no -arch and no options at all, print usage message. if (parsedArgs.size() == 0) { - table.PrintHelp(llvm::outs(), + table.printHelp(llvm::outs(), (std::string(args[0]) + " [options] file...").c_str(), "LLVM Linker", false); } else { diff --git a/gnu/llvm/lld/lib/ReaderWriter/MachO/File.h b/gnu/llvm/lld/lib/ReaderWriter/MachO/File.h index 8d59656beab..77832969c6b 100644 --- a/gnu/llvm/lld/lib/ReaderWriter/MachO/File.h +++ b/gnu/llvm/lld/lib/ReaderWriter/MachO/File.h @@ -17,8 +17,8 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Format.h" -#include "llvm/TextAPI/MachO/InterfaceFile.h" -#include "llvm/TextAPI/MachO/TextAPIReader.h" +#include "llvm/TextAPI/InterfaceFile.h" +#include "llvm/TextAPI/TextAPIReader.h" #include <unordered_map> namespace lld { diff --git a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp index 42ac711bc9d..ddfd1764f7e 100644 --- a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp +++ b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp @@ -1561,7 +1561,7 @@ void Util::addExportInfo(const lld::File &atomFile, NormalizedFile &nFile) { uint32_t Util::fileFlags() { // FIXME: these need to determined at runtime. if (_ctx.outputMachOType() == MH_OBJECT) { - return _subsectionsViaSymbols ? MH_SUBSECTIONS_VIA_SYMBOLS : 0; + return _subsectionsViaSymbols ? (uint32_t)MH_SUBSECTIONS_VIA_SYMBOLS : 0; } else { uint32_t flags = MH_DYLDLINK; if (!_ctx.useFlatNamespace()) diff --git a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp index 0a59e24c47a..164a283b972 100644 --- a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp +++ b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp @@ -836,9 +836,8 @@ dataExtractorFromSection(const NormalizedFile &normalizedFile, // inspection" code if possible. static uint64_t getCUAbbrevOffset(llvm::DataExtractor abbrevData, uint64_t abbrCode) { - uint64_t curCode; uint64_t offset = 0; - while ((curCode = abbrevData.getULEB128(&offset)) != abbrCode) { + while (abbrevData.getULEB128(&offset) != abbrCode) { // Tag abbrevData.getULEB128(&offset); // DW_CHILDREN diff --git a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp index 7f53faaeaea..3826e97d62b 100644 --- a/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp +++ b/gnu/llvm/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp @@ -740,9 +740,7 @@ struct MappingTraits<NormalizedFile> { io.mapOptional("exports", file.exportInfo); io.mapOptional("dataInCode", file.dataInCode); } - static StringRef validate(IO &io, NormalizedFile &file) { - return StringRef(); - } + static std::string validate(IO &io, NormalizedFile &file) { return {}; } }; } // namespace llvm diff --git a/gnu/llvm/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp b/gnu/llvm/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp index 279ffe5e250..c0e6e0334fa 100644 --- a/gnu/llvm/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp +++ b/gnu/llvm/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp @@ -1299,7 +1299,7 @@ public: llvm::Error writeFile(const lld::File &file, StringRef outPath) override { // Create stream to path. std::error_code ec; - llvm::raw_fd_ostream out(outPath, ec, llvm::sys::fs::OF_Text); + llvm::raw_fd_ostream out(outPath, ec, llvm::sys::fs::OF_TextWithCRLF); if (ec) return llvm::errorCodeToError(ec); |