xref: /freebsd/contrib/llvm-project/lld/COFF/MinGW.h (revision 53071ed1c96db7f89defc99c95b0ad1031d48f45)
1 //===- MinGW.h --------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLD_COFF_MINGW_H
10 #define LLD_COFF_MINGW_H
11 
12 #include "Config.h"
13 #include "Symbols.h"
14 #include "lld/Common/LLVM.h"
15 
16 namespace lld {
17 namespace coff {
18 
19 // Logic for deciding what symbols to export, when exporting all
20 // symbols for MinGW.
21 class AutoExporter {
22 public:
23   AutoExporter();
24 
25   void addWholeArchive(StringRef path);
26 
27   llvm::StringSet<> excludeSymbols;
28   llvm::StringSet<> excludeSymbolPrefixes;
29   llvm::StringSet<> excludeSymbolSuffixes;
30   llvm::StringSet<> excludeLibs;
31   llvm::StringSet<> excludeObjects;
32 
33   bool shouldExport(Defined *sym) const;
34 };
35 
36 void writeDefFile(StringRef name);
37 
38 } // namespace coff
39 } // namespace lld
40 
41 #endif
42