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 31int64_t getHex(llvm::opt::InputArgList &args, unsigned key, int64_t Default); 32 33llvm::SmallVector<StringRef, 0> getStrings(llvm::opt::InputArgList &args, 34 int id); 35 36uint64_t getZOptionValue(llvm::opt::InputArgList &args, int id, StringRef key, 37 uint64_t Default); 38 39std::vector<StringRef> getLines(MemoryBufferRef mb); 40 41StringRef getFilenameWithoutExe(StringRef path); 42 43} // namespace args 44} // namespace lld 45 46#endif 47