diff options
Diffstat (limited to 'include/llvm/Object/COFFImportFile.h')
-rw-r--r-- | include/llvm/Object/COFFImportFile.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/llvm/Object/COFFImportFile.h b/include/llvm/Object/COFFImportFile.h index 0a4556ad8884..5aa836411118 100644 --- a/include/llvm/Object/COFFImportFile.h +++ b/include/llvm/Object/COFFImportFile.h @@ -1,9 +1,8 @@ //===- COFFImportFile.h - COFF short import file implementation -*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -37,12 +36,11 @@ public: void moveSymbolNext(DataRefImpl &Symb) const override { ++Symb.p; } - std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const override { + Error printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override { if (Symb.p == 0) OS << "__imp_"; OS << StringRef(Data.getBufferStart() + sizeof(coff_import_header)); - return std::error_code(); + return Error::success(); } uint32_t getSymbolFlags(DataRefImpl Symb) const override { @@ -71,9 +69,21 @@ private: }; struct COFFShortExport { + /// The name of the export as specified in the .def file or on the command + /// line, i.e. "foo" in "/EXPORT:foo", and "bar" in "/EXPORT:foo=bar". This + /// may lack mangling, such as underscore prefixing and stdcall suffixing. std::string Name; + + /// The external, exported name. Only non-empty when export renaming is in + /// effect, i.e. "foo" in "/EXPORT:foo=bar". std::string ExtName; + + /// The real, mangled symbol name from the object file. Given + /// "/export:foo=bar", this could be "_bar@8" if bar is stdcall. std::string SymbolName; + + /// Creates a weak alias. This is the name of the weak aliasee. In a .def + /// file, this is "baz" in "EXPORTS\nfoo = bar == baz". std::string AliasTarget; uint16_t Ordinal = 0; |