Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:17

0001 //===--- COFFModuleDefinition.h ---------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // Windows-specific.
0010 // A parser for the module-definition file (.def file).
0011 // Parsed results are directly written to Config global variable.
0012 //
0013 // The format of module-definition files are described in this document:
0014 // https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
0015 //
0016 //===----------------------------------------------------------------------===//
0017 
0018 #ifndef LLVM_OBJECT_COFFMODULEDEFINITION_H
0019 #define LLVM_OBJECT_COFFMODULEDEFINITION_H
0020 
0021 #include "llvm/BinaryFormat/COFF.h"
0022 #include "llvm/Object/COFFImportFile.h"
0023 
0024 namespace llvm {
0025 namespace object {
0026 
0027 struct COFFModuleDefinition {
0028   std::vector<COFFShortExport> Exports;
0029   std::string OutputFile;
0030   std::string ImportName;
0031   uint64_t ImageBase = 0;
0032   uint64_t StackReserve = 0;
0033   uint64_t StackCommit = 0;
0034   uint64_t HeapReserve = 0;
0035   uint64_t HeapCommit = 0;
0036   uint32_t MajorImageVersion = 0;
0037   uint32_t MinorImageVersion = 0;
0038   uint32_t MajorOSVersion = 0;
0039   uint32_t MinorOSVersion = 0;
0040 };
0041 
0042 Expected<COFFModuleDefinition>
0043 parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine,
0044                           bool MingwDef = false, bool AddUnderscores = true);
0045 
0046 } // End namespace object.
0047 } // End namespace llvm.
0048 
0049 #endif