1 //===- OptimizationOptions.h ----------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #ifndef MCLD_LDLITE_OPTIMIZATION_OPTIONS_H 10 #define MCLD_LDLITE_OPTIMIZATION_OPTIONS_H 11 #include <mcld/GeneralOptions.h> 12 #include <llvm/Support/CommandLine.h> 13 #include <string> 14 15 namespace mcld { 16 17 class LinkerConfig; 18 19 class OptimizationOptions 20 { 21 public: 22 OptimizationOptions(); 23 24 bool parse(LinkerConfig& pConfig); 25 26 private: 27 bool& m_GCSections; 28 bool& m_PrintGCSections; 29 bool& m_GenUnwindInfo; 30 llvm::cl::opt<mcld::GeneralOptions::ICF>& m_ICF; 31 llvm::cl::opt<unsigned>& m_ICFIterations; 32 llvm::cl::opt<bool>& m_PrintICFSections; 33 llvm::cl::opt<char>& m_OptLevel; 34 llvm::cl::list<std::string>& m_Plugin; 35 llvm::cl::list<std::string>& m_PluginOpt; 36 }; 37 38 } // namespace of mcld 39 40 #endif 41 42