blob: b3c8686e57e229a08ea63cc2a4c826de0a8a3634 [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
Andrew Walbran3d2c1972020-04-07 12:24:26 +010026llvm::CodeGenOpt::Level getCGOptLevel(int optLevelLTO);
Andrew Walbran16937d02019-10-22 13:54:20 +010027
Andrew Walbran3d2c1972020-04-07 12:24:26 +010028int64_t getInteger(llvm::opt::InputArgList &args, unsigned key,
29 int64_t Default);
Andrew Walbran16937d02019-10-22 13:54:20 +010030
Andrew Walbran3d2c1972020-04-07 12:24:26 +010031std::vector<StringRef> getStrings(llvm::opt::InputArgList &args, int id);
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010032
Andrew Walbran3d2c1972020-04-07 12:24:26 +010033uint64_t getZOptionValue(llvm::opt::InputArgList &args, int id, StringRef key,
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010034 uint64_t Default);
35
Andrew Walbran3d2c1972020-04-07 12:24:26 +010036std::vector<StringRef> getLines(MemoryBufferRef mb);
Andrew Scull0372a572018-11-16 15:47:06 +000037
Andrew Walbran3d2c1972020-04-07 12:24:26 +010038StringRef getFilenameWithoutExe(StringRef path);
Andrew Scull0372a572018-11-16 15:47:06 +000039
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010040} // namespace args
41} // namespace lld
42
43#endif