1//===- Args.h ---------------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLD_ARGS_H
10#define LLD_ARGS_H
11
12#include "lld/Common/LLVM.h"
13#include "llvm/Support/CodeGen.h"
14#include "llvm/Support/MemoryBuffer.h"
15#include <vector>
16
17namespace llvm {
18namespace opt {
19class InputArgList;
20}
21} // namespace llvm
22
23namespace lld {
24namespace args {
25
26llvm::CodeGenOpt::Level getCGOptLevel(int optLevelLTO);
27
28int64_t getInteger(llvm::opt::InputArgList &args, unsigned key,
29                   int64_t Default);
30
31std::vector<StringRef> getStrings(llvm::opt::InputArgList &args, int id);
32
33uint64_t getZOptionValue(llvm::opt::InputArgList &args, int id, StringRef key,
34                         uint64_t Default);
35
36std::vector<StringRef> getLines(MemoryBufferRef mb);
37
38StringRef getFilenameWithoutExe(StringRef path);
39
40} // namespace args
41} // namespace lld
42
43#endif
44