@@ -38,30 +38,30 @@ static const auto I386 = llvm::COFF::IMAGE_FILE_MACHINE_I386;
3838
3939// Represents an /export option.
4040struct Export {
41- StringRef Name ; // N in /export:N or /export:E=N
42- StringRef ExtName ; // E in /export:E=N
43- Symbol *Sym = nullptr ;
44- uint16_t Ordinal = 0 ;
45- bool Noname = false ;
46- bool Data = false ;
47- bool Private = false ;
48- bool Constant = false ;
41+ StringRef name ; // N in /export:N or /export:E=N
42+ StringRef extName ; // E in /export:E=N
43+ Symbol *sym = nullptr ;
44+ uint16_t ordinal = 0 ;
45+ bool noname = false ;
46+ bool data = false ;
47+ bool isPrivate = false ;
48+ bool constant = false ;
4949
5050 // If an export is a form of /export:foo=dllname.bar, that means
5151 // that foo should be exported as an alias to bar in the DLL.
5252 // ForwardTo is set to "dllname.bar" part. Usually empty.
53- StringRef ForwardTo ;
54- StringChunk *ForwardChunk = nullptr ;
53+ StringRef forwardTo ;
54+ StringChunk *forwardChunk = nullptr ;
5555
5656 // True if this /export option was in .drectves section.
57- bool Directives = false ;
58- StringRef SymbolName ;
59- StringRef ExportName ; // Name in DLL
60-
61- bool operator ==(const Export &E ) {
62- return (Name == E. Name && ExtName == E. ExtName &&
63- Ordinal == E. Ordinal && Noname == E. Noname &&
64- Data == E. Data && Private == E. Private );
57+ bool directives = false ;
58+ StringRef symbolName ;
59+ StringRef exportName ; // Name in DLL
60+
61+ bool operator ==(const Export &e ) {
62+ return (name == e. name && extName == e. extName &&
63+ ordinal == e. ordinal && noname == e. noname &&
64+ data == e. data && isPrivate == e. isPrivate );
6565 }
6666};
6767
@@ -81,137 +81,137 @@ enum class GuardCFLevel {
8181// Global configuration.
8282struct Configuration {
8383 enum ManifestKind { SideBySide, Embed, No };
84- bool is64 () { return Machine == AMD64 || Machine == ARM64; }
85-
86- llvm::COFF::MachineTypes Machine = IMAGE_FILE_MACHINE_UNKNOWN;
87- size_t Wordsize ;
88- bool Verbose = false ;
89- WindowsSubsystem Subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
90- Symbol *Entry = nullptr ;
91- bool NoEntry = false ;
92- std::string OutputFile ;
93- std::string ImportName ;
94- bool Demangle = true ;
95- bool DoGC = true ;
96- bool DoICF = true ;
97- bool TailMerge ;
98- bool Relocatable = true ;
99- bool ForceMultiple = false ;
100- bool ForceMultipleRes = false ;
101- bool ForceUnresolved = false ;
102- bool Debug = false ;
103- bool DebugDwarf = false ;
104- bool DebugGHashes = false ;
105- bool DebugSymtab = false ;
106- bool ShowTiming = false ;
107- bool ShowSummary = false ;
108- unsigned DebugTypes = static_cast <unsigned >(DebugType::None);
109- std::vector<std::string> NatvisFiles ;
110- llvm::SmallString<128 > PDBAltPath ;
111- llvm::SmallString<128 > PDBPath ;
112- llvm::SmallString<128 > PDBSourcePath ;
113- std::vector<llvm::StringRef> Argv ;
84+ bool is64 () { return machine == AMD64 || machine == ARM64; }
85+
86+ llvm::COFF::MachineTypes machine = IMAGE_FILE_MACHINE_UNKNOWN;
87+ size_t wordsize ;
88+ bool verbose = false ;
89+ WindowsSubsystem subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
90+ Symbol *entry = nullptr ;
91+ bool noEntry = false ;
92+ std::string outputFile ;
93+ std::string importName ;
94+ bool demangle = true ;
95+ bool doGC = true ;
96+ bool doICF = true ;
97+ bool tailMerge ;
98+ bool relocatable = true ;
99+ bool forceMultiple = false ;
100+ bool forceMultipleRes = false ;
101+ bool forceUnresolved = false ;
102+ bool debug = false ;
103+ bool debugDwarf = false ;
104+ bool debugGHashes = false ;
105+ bool debugSymtab = false ;
106+ bool showTiming = false ;
107+ bool showSummary = false ;
108+ unsigned debugTypes = static_cast <unsigned >(DebugType::None);
109+ std::vector<std::string> natvisFiles ;
110+ llvm::SmallString<128 > pdbAltPath ;
111+ llvm::SmallString<128 > pdbPath ;
112+ llvm::SmallString<128 > pdbSourcePath ;
113+ std::vector<llvm::StringRef> argv ;
114114
115115 // Symbols in this set are considered as live by the garbage collector.
116- std::vector<Symbol *> GCRoot ;
116+ std::vector<Symbol *> gCRoot ;
117117
118- std::set<std::string> NoDefaultLibs ;
119- bool NoDefaultLibAll = false ;
118+ std::set<std::string> noDefaultLibs ;
119+ bool noDefaultLibAll = false ;
120120
121121 // True if we are creating a DLL.
122- bool DLL = false ;
123- StringRef Implib ;
124- std::vector<Export> Exports ;
125- std::set<std::string> DelayLoads ;
126- std::map<std::string, int > DLLOrder ;
127- Symbol *DelayLoadHelper = nullptr ;
122+ bool dll = false ;
123+ StringRef implib ;
124+ std::vector<Export> exports ;
125+ std::set<std::string> delayLoads ;
126+ std::map<std::string, int > dllOrder ;
127+ Symbol *delayLoadHelper = nullptr ;
128128
129- bool SaveTemps = false ;
129+ bool saveTemps = false ;
130130
131131 // /guard:cf
132- GuardCFLevel GuardCF = GuardCFLevel::Off;
132+ GuardCFLevel guardCF = GuardCFLevel::Off;
133133
134134 // Used for SafeSEH.
135- Symbol *SEHTable = nullptr ;
136- Symbol *SEHCount = nullptr ;
135+ Symbol *sehTable = nullptr ;
136+ Symbol *sehCount = nullptr ;
137137
138138 // Used for /opt:lldlto=N
139- unsigned LTOO = 2 ;
139+ unsigned ltoo = 2 ;
140140
141141 // Used for /opt:lldltojobs=N
142- unsigned ThinLTOJobs = 0 ;
142+ unsigned thinLTOJobs = 0 ;
143143 // Used for /opt:lldltopartitions=N
144- unsigned LTOPartitions = 1 ;
144+ unsigned ltoPartitions = 1 ;
145145
146146 // Used for /opt:lldltocache=path
147- StringRef LTOCache ;
147+ StringRef ltoCache ;
148148 // Used for /opt:lldltocachepolicy=policy
149- llvm::CachePruningPolicy LTOCachePolicy ;
149+ llvm::CachePruningPolicy ltoCachePolicy ;
150150
151151 // Used for /merge:from=to (e.g. /merge:.rdata=.text)
152- std::map<StringRef, StringRef> Merge ;
152+ std::map<StringRef, StringRef> merge ;
153153
154154 // Used for /section=.name,{DEKPRSW} to set section attributes.
155- std::map<StringRef, uint32_t > Section ;
155+ std::map<StringRef, uint32_t > section ;
156156
157157 // Options for manifest files.
158- ManifestKind Manifest = No;
159- int ManifestID = 1 ;
160- StringRef ManifestDependency ;
161- bool ManifestUAC = true ;
162- std::vector<std::string> ManifestInput ;
163- StringRef ManifestLevel = " 'asInvoker'" ;
164- StringRef ManifestUIAccess = " 'false'" ;
165- StringRef ManifestFile ;
158+ ManifestKind manifest = No;
159+ int manifestID = 1 ;
160+ StringRef manifestDependency ;
161+ bool manifestUAC = true ;
162+ std::vector<std::string> manifestInput ;
163+ StringRef manifestLevel = " 'asInvoker'" ;
164+ StringRef manifestUIAccess = " 'false'" ;
165+ StringRef manifestFile ;
166166
167167 // Used for /aligncomm.
168- std::map<std::string, int > AlignComm ;
168+ std::map<std::string, int > alignComm ;
169169
170170 // Used for /failifmismatch.
171- std::map<StringRef, std::pair<StringRef, InputFile *>> MustMatch ;
171+ std::map<StringRef, std::pair<StringRef, InputFile *>> mustMatch ;
172172
173173 // Used for /alternatename.
174- std::map<StringRef, StringRef> AlternateNames ;
174+ std::map<StringRef, StringRef> alternateNames ;
175175
176176 // Used for /order.
177- llvm::StringMap<int > Order ;
177+ llvm::StringMap<int > order ;
178178
179179 // Used for /lldmap.
180- std::string MapFile ;
181-
182- uint64_t ImageBase = -1 ;
183- uint64_t FileAlign = 512 ;
184- uint64_t StackReserve = 1024 * 1024 ;
185- uint64_t StackCommit = 4096 ;
186- uint64_t HeapReserve = 1024 * 1024 ;
187- uint64_t HeapCommit = 4096 ;
188- uint32_t MajorImageVersion = 0 ;
189- uint32_t MinorImageVersion = 0 ;
190- uint32_t MajorOSVersion = 6 ;
191- uint32_t MinorOSVersion = 0 ;
192- uint32_t Timestamp = 0 ;
193- uint32_t FunctionPadMin = 0 ;
194- bool DynamicBase = true ;
195- bool AllowBind = true ;
196- bool NxCompat = true ;
197- bool AllowIsolation = true ;
198- bool TerminalServerAware = true ;
199- bool LargeAddressAware = false ;
200- bool HighEntropyVA = false ;
201- bool AppContainer = false ;
202- bool MinGW = false ;
203- bool WarnMissingOrderSymbol = true ;
204- bool WarnLocallyDefinedImported = true ;
205- bool WarnDebugInfoUnusable = true ;
206- bool Incremental = true ;
207- bool IntegrityCheck = false ;
208- bool KillAt = false ;
209- bool Repro = false ;
210- bool SwaprunCD = false ;
211- bool SwaprunNet = false ;
180+ std::string mapFile ;
181+
182+ uint64_t imageBase = -1 ;
183+ uint64_t fileAlign = 512 ;
184+ uint64_t stackReserve = 1024 * 1024 ;
185+ uint64_t stackCommit = 4096 ;
186+ uint64_t heapReserve = 1024 * 1024 ;
187+ uint64_t heapCommit = 4096 ;
188+ uint32_t majorImageVersion = 0 ;
189+ uint32_t minorImageVersion = 0 ;
190+ uint32_t majorOSVersion = 6 ;
191+ uint32_t minorOSVersion = 0 ;
192+ uint32_t timestamp = 0 ;
193+ uint32_t functionPadMin = 0 ;
194+ bool dynamicBase = true ;
195+ bool allowBind = true ;
196+ bool nxCompat = true ;
197+ bool allowIsolation = true ;
198+ bool terminalServerAware = true ;
199+ bool largeAddressAware = false ;
200+ bool highEntropyVA = false ;
201+ bool appContainer = false ;
202+ bool mingw = false ;
203+ bool warnMissingOrderSymbol = true ;
204+ bool warnLocallyDefinedImported = true ;
205+ bool warnDebugInfoUnusable = true ;
206+ bool incremental = true ;
207+ bool integrityCheck = false ;
208+ bool killAt = false ;
209+ bool repro = false ;
210+ bool swaprunCD = false ;
211+ bool swaprunNet = false ;
212212};
213213
214- extern Configuration *Config ;
214+ extern Configuration *config ;
215215
216216} // namespace coff
217217} // namespace lld
0 commit comments