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#include "llvm/ADT/StringSet.h" 16 17namespace lld { 18namespace coff { 19 20// Logic for deciding what symbols to export, when exporting all 21// symbols for MinGW. 22class AutoExporter { 23public: 24 AutoExporter(); 25 26 void addWholeArchive(StringRef path); 27 28 llvm::StringSet<> excludeSymbols; 29 llvm::StringSet<> excludeSymbolPrefixes; 30 llvm::StringSet<> excludeSymbolSuffixes; 31 llvm::StringSet<> excludeLibs; 32 llvm::StringSet<> excludeObjects; 33 34 bool shouldExport(Defined *sym) const; 35}; 36 37void writeDefFile(StringRef name); 38 39} // namespace coff 40} // namespace lld 41 42#endif 43