1//===- PreferenceOptions.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_PREFERENCE_OPTIONS_H 10#define MCLD_LDLITE_PREFERENCE_OPTIONS_H 11#include <llvm/Support/CommandLine.h> 12#include <string> 13 14namespace mcld { 15 16class LinkerConfig; 17 18class PreferenceOptions 19{ 20public: 21 enum Color { 22 COLOR_Never, 23 COLOR_Always, 24 COLOR_Auto 25 }; 26 27public: 28 PreferenceOptions(); 29 30 bool parse(LinkerConfig& pConfig); 31 32private: 33 llvm::cl::opt<bool>& m_Trace; 34 llvm::cl::opt<int>& m_Verbose; 35 llvm::cl::opt<bool>& m_Version; 36 llvm::cl::opt<int>& m_MaxErrorNum; 37 llvm::cl::opt<int>& m_MaxWarnNum; 38 llvm::cl::opt<Color>& m_Color; 39 llvm::cl::opt<bool>& m_PrintMap; 40 bool& m_FatalWarnings; 41}; 42 43} // namespace of mcld 44 45#endif 46 47