diff --git a/lld/include/lld/Driver/GnuLDInputGraph.h b/lld/include/lld/Driver/GnuLDInputGraph.h index ea69fd1e62d9..e70ac91c7d7c 100644 --- a/lld/include/lld/Driver/GnuLDInputGraph.h +++ b/lld/include/lld/Driver/GnuLDInputGraph.h @@ -26,8 +26,8 @@ namespace lld { class ELFFileNode : public FileNode { public: ELFFileNode(ELFLinkingContext &ctx, StringRef path, - bool isWholeArchive = false, bool asNeeded = false, - std::vector searchPath = { "" }) + std::vector searchPath, + bool isWholeArchive = false, bool asNeeded = false) : FileNode(path), _elfLinkingContext(ctx), _isWholeArchive(isWholeArchive), _asNeeded(asNeeded) { std::copy(searchPath.begin(), searchPath.end(), diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp index 96fa31905fc5..4cd0d52d2728 100644 --- a/lld/lib/Driver/GnuLdDriver.cpp +++ b/lld/lib/Driver/GnuLdDriver.cpp @@ -270,8 +270,8 @@ bool GnuLdDriver::parse(int argc, const char *argv[], case OPT_l: { std::unique_ptr inputFile = std::move(std::unique_ptr( - new ELFFileNode(*ctx, inputArg->getValue(), isWholeArchive, - asNeeded, searchPath))); + new ELFFileNode(*ctx, inputArg->getValue(), searchPath, + isWholeArchive, asNeeded))); if (controlNodeStack.empty()) inputGraph->addInputElement(std::move(inputFile)); else