blob: d94364668a0a9a4839719783489e227124c5878a [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- Args.h ---------------------------------------------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLD_ARGS_H
10#define LLD_ARGS_H
11
12#include "lld/Common/LLVM.h"
Andrew Walbran16937d02019-10-22 13:54:20 +010013#include "llvm/Support/CodeGen.h"
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010014#include "llvm/Support/MemoryBuffer.h"
15#include <vector>
16
17namespace llvm {
18namespace opt {
19class InputArgList;
20}
21} // namespace llvm
22
23namespace lld {
24namespace args {
Andrew Walbran16937d02019-10-22 13:54:20 +010025
26llvm::CodeGenOpt::Level getCGOptLevel(int OptLevelLTO);
27
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010028int getInteger(llvm::opt::InputArgList &Args, unsigned Key, int Default);
Andrew Walbran16937d02019-10-22 13:54:20 +010029
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010030std::vector<StringRef> getStrings(llvm::opt::InputArgList &Args, int Id);
31
32uint64_t getZOptionValue(llvm::opt::InputArgList &Args, int Id, StringRef Key,
33 uint64_t Default);
34
35std::vector<StringRef> getLines(MemoryBufferRef MB);
Andrew Scull0372a572018-11-16 15:47:06 +000036
37StringRef getFilenameWithoutExe(StringRef Path);
38
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010039} // namespace args
40} // namespace lld
41
42#endif