blob: 641f99b5153ae4713a03f957566176996a710233 [file] [log] [blame]
Rui Ueyama411c63602015-05-28 19:09:30 +00001//===- 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 Ueyama3d3e6fb2015-05-29 16:06:00 +000014#include "llvm/Object/COFF.h"
Rui Ueyama411c63602015-05-28 19:09:30 +000015#include <cstdint>
16#include <set>
17#include <string>
18
19namespace lld {
20namespace coff {
21
22class Configuration {
23public:
Rui Ueyama3d3e6fb2015-05-29 16:06:00 +000024 llvm::COFF::MachineTypes MachineType = llvm::COFF::IMAGE_FILE_MACHINE_AMD64;
Rui Ueyama411c63602015-05-28 19:09:30 +000025 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
33private:
34 std::set<std::string> VisitedFiles;
35};
36
37extern Configuration *Config;
38
39} // namespace coff
40} // namespace lld
41
42#endif