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