xref: /freebsd-12.1/contrib/llvm/tools/lld/COFF/MinGW.h (revision b5893f02)
1 //===- MinGW.h --------------------------------------------------*- C++ -*-===//
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_MINGW_H
11 #define LLD_COFF_MINGW_H
12 
13 #include "Config.h"
14 #include "Symbols.h"
15 #include "lld/Common/LLVM.h"
16 
17 namespace lld {
18 namespace coff {
19 
20 // Logic for deciding what symbols to export, when exporting all
21 // symbols for MinGW.
22 class AutoExporter {
23 public:
24   AutoExporter();
25 
26   void initSymbolExcludes();
27 
28   void addWholeArchive(StringRef Path);
29 
30   llvm::StringSet<> ExcludeSymbols;
31   llvm::StringSet<> ExcludeSymbolPrefixes;
32   llvm::StringSet<> ExcludeSymbolSuffixes;
33   llvm::StringSet<> ExcludeLibs;
34   llvm::StringSet<> ExcludeObjects;
35 
36   bool shouldExport(Defined *Sym) const;
37 };
38 
39 void writeDefFile(StringRef Name);
40 
41 } // namespace coff
42 } // namespace lld
43 
44 #endif
45