| Rui Ueyama | 411c6360 | 2015-05-28 19:09:30 +0000 | [diff] [blame] | 1 | //===- Config.h -----------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Linker |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLD_COFF_CONFIG_H |
| 11 | #define LLD_COFF_CONFIG_H |
| 12 | |
| 13 | #include "llvm/ADT/StringRef.h" |
| 14 | #include <cstdint> |
| 15 | #include <set> |
| 16 | #include <string> |
| 17 | |
| 18 | namespace lld { |
| 19 | namespace coff { |
| 20 | |
| 21 | class Configuration { |
| 22 | public: |
| 23 | bool Verbose = false; |
| 24 | std::string EntryName = "mainCRTStartup"; |
| 25 | uint64_t ImageBase = 0x140000000; |
| 26 | |
| 27 | bool insertFile(llvm::StringRef Path) { |
| 28 | return VisitedFiles.insert(Path.lower()).second; |
| 29 | } |
| 30 | |
| 31 | private: |
| 32 | std::set<std::string> VisitedFiles; |
| 33 | }; |
| 34 | |
| 35 | extern Configuration *Config; |
| 36 | |
| 37 | } // namespace coff |
| 38 | } // namespace lld |
| 39 | |
| 40 | #endif |