Skip to content

Commit 32242fb

Browse files
committed
[Object][COFF][NFC] Document writeImportLibrary.
1 parent bc66e0c commit 32242fb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llvm/include/llvm/Object/COFFImportFile.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,18 @@ struct COFFShortExport {
135135
}
136136
};
137137

138+
/// Writes a COFF import library containing entries described by the Exports
139+
/// array.
140+
///
141+
/// For hybrid targets such as ARM64EC, additional native entry points can be
142+
/// exposed using the NativeExports parameter. When NativeExports is used, the
143+
/// output import library will expose these native ARM64 imports alongside the
144+
/// entries described in the Exports array. Such a library can be used for
145+
/// linking both ARM64EC and pure ARM64 objects, and the linker will pick only
146+
/// the exports relevant to the target platform.
147+
///
148+
/// For non-hybrid targets, the NativeExports parameter should not be used.
149+
/// Instead, pass std::nullopt or an empty array to this parameter.
138150
Error writeImportLibrary(StringRef ImportName, StringRef Path,
139151
ArrayRef<COFFShortExport> Exports,
140152
ArrayRef<COFFShortExport> NativeExports,

0 commit comments

Comments
 (0)