• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 namespace llvm {
18 namespace opt {
19 class InputArgList;
20 }
21 } // namespace llvm
22 
23 namespace lld {
24 namespace args {
25 
26 llvm::CodeGenOpt::Level getCGOptLevel(int optLevelLTO);
27 
28 int64_t getInteger(llvm::opt::InputArgList &args, unsigned key,
29                    int64_t Default);
30 
31 int64_t getHex(llvm::opt::InputArgList &args, unsigned key, int64_t Default);
32 
33 std::vector<StringRef> getStrings(llvm::opt::InputArgList &args, int id);
34 
35 uint64_t getZOptionValue(llvm::opt::InputArgList &args, int id, StringRef key,
36                          uint64_t Default);
37 
38 std::vector<StringRef> getLines(MemoryBufferRef mb);
39 
40 StringRef getFilenameWithoutExe(StringRef path);
41 
42 } // namespace args
43 } // namespace lld
44 
45 #endif
46