Path: blob/main/contrib/llvm-project/lld/ELF/Driver.h
34907 views
//===- Driver.h -------------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLD_ELF_DRIVER_H9#define LLD_ELF_DRIVER_H1011#include "lld/Common/LLVM.h"12#include "llvm/ADT/StringRef.h"13#include "llvm/Option/ArgList.h"14#include <optional>1516namespace lld::elf {17// Parses command line options.18class ELFOptTable : public llvm::opt::GenericOptTable {19public:20ELFOptTable();21llvm::opt::InputArgList parse(ArrayRef<const char *> argv);22};2324// Create enum with OPT_xxx values for each option in Options.td25enum {26OPT_INVALID = 0,27#define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__),28#include "Options.inc"29#undef OPTION30};3132void printHelp();33std::string createResponseFile(const llvm::opt::InputArgList &args);3435std::optional<std::string> findFromSearchPaths(StringRef path);36std::optional<std::string> searchScript(StringRef path);37std::optional<std::string> searchLibraryBaseName(StringRef path);38std::optional<std::string> searchLibrary(StringRef path);3940} // namespace lld::elf4142#endif434445