| 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" |
| Rui Ueyama | 3d3e6fb | 2015-05-29 16:06:00 +0000 | [diff] [blame^] | 14 | #include "llvm/Object/COFF.h" |
| Rui Ueyama | 411c6360 | 2015-05-28 19:09:30 +0000 | [diff] [blame] | 15 | #include <cstdint> |
| 16 | #include <set> |
| 17 | #include <string> |
| 18 | |
| 19 | namespace lld { |
| 20 | namespace coff { |
| 21 | |
| 22 | class Configuration { |
| 23 | public: |
| Rui Ueyama | 3d3e6fb | 2015-05-29 16:06:00 +0000 | [diff] [blame^] | 24 | llvm::COFF::MachineTypes MachineType = llvm::COFF::IMAGE_FILE_MACHINE_AMD64; |
| Rui Ueyama | 411c6360 | 2015-05-28 19:09:30 +0000 | [diff] [blame] | 25 | bool Verbose = false; |
| 26 | std::string EntryName = "mainCRTStartup"; |
| 27 | uint64_t ImageBase = 0x140000000; |
| 28 | |
| 29 | bool insertFile(llvm::StringRef Path) { |
| 30 | return VisitedFiles.insert(Path.lower()).second; |
| 31 | } |
| 32 | |
| 33 | private: |
| 34 | std::set<std::string> VisitedFiles; |
| 35 | }; |
| 36 | |
| 37 | extern Configuration *Config; |
| 38 | |
| 39 | } // namespace coff |
| 40 | } // namespace lld |
| 41 | |
| 42 | #endif |