forked from llvm/llvm-project
- Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathDriver.h
45 lines (36 loc) · 1.31 KB
/
Driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//===- Driver.h -------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLD_ELF_DRIVER_H
#defineLLD_ELF_DRIVER_H
#include"lld/Common/LLVM.h"
#include"llvm/ADT/StringRef.h"
#include"llvm/Option/ArgList.h"
#include<optional>
namespacelld::elf {
structCtx;
// Parses command line options.
classELFOptTable : publicllvm::opt::GenericOptTable {
public:
ELFOptTable();
llvm::opt::InputArgList parse(Ctx &, ArrayRef<constchar *> argv);
};
// Create enum with OPT_xxx values for each option in Options.td
enum {
OPT_INVALID = 0,
#defineOPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__),
#include"Options.inc"
#undef OPTION
};
voidprintHelp(Ctx &ctx);
std::string createResponseFile(const llvm::opt::InputArgList &args);
std::optional<std::string> findFromSearchPaths(Ctx &, StringRef path);
std::optional<std::string> searchScript(Ctx &, StringRef path);
std::optional<std::string> searchLibraryBaseName(Ctx &, StringRef path);
std::optional<std::string> searchLibrary(Ctx &, StringRef path);
} // namespace lld::elf
#endif