<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Object/COFFModuleDefinition.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Object][COFF] Avoid underscore prefix for forwarding exports (#135433)</title>
<updated>2025-04-12T11:24:45+00:00</updated>
<author>
<name>Jacek Caban</name>
<email>jacek@codeweavers.com</email>
</author>
<published>2025-04-12T11:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2b270df2e7be5deef5d471b7624363d9b48b4480'/>
<id>2b270df2e7be5deef5d471b7624363d9b48b4480</id>
<content type='text'>
Fixes #132411.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #132411.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-dlltool] Remove the i386 underscore prefix from COFFImportFile::ImportName. NFC. (#98226)</title>
<updated>2024-07-16T20:10:29+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2024-07-16T20:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80e18b93c5abfcbf296b6e2b45cea1ee77633f1e'/>
<id>80e18b93c5abfcbf296b6e2b45cea1ee77633f1e</id>
<content type='text'>
On i386, regular C level symbols are given an underscore prefix
in the symbols on the object file level. However, the exported
names from DLLs usually don't have this leading underscore.

When specified in a def file like "symbol == dllname", the "dllname"
is the name of the exported symbol from the DLL, which will be
linked against from an object file symbol named "_symbol"
(on i386).

The mechanism where one symbol is redirected to another one in
an import library is implemented with weak aliases. In that case,
we need to have the object file symbol level name for the target
of the import, as we make one object file symbol point at another
one. Therefore, we added an underscore to the ImportName field.

(This mechanism, with weak aliases, only works as long as the
target also is exported as is, in that form - this issue is
dealt with in a later commit.)

For clarity, for potentially handling the import renaming in
other ways, store the ImportName field unprefixed, containing
the actual name to import from the DLL.

When creating the aliases, add the prefix as needed. This requires
passing an extra AddUnderscores parameter to the writeImportLibrary
function; this is a temporary measure, until alias creation is
reworked in a later commit.

This doesn't preserve the corner case of checking !isDecorated()
before adding the prefix. This corner case isn't tested by any
of our existing tests, and only would trigger for
fastcall/vectorcall/MS C++ functions - while these kinds of
renames primarily are used in mingw-w64-crt import libraries
(which primarily handle cdecl and stdcall functions).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On i386, regular C level symbols are given an underscore prefix
in the symbols on the object file level. However, the exported
names from DLLs usually don't have this leading underscore.

When specified in a def file like "symbol == dllname", the "dllname"
is the name of the exported symbol from the DLL, which will be
linked against from an object file symbol named "_symbol"
(on i386).

The mechanism where one symbol is redirected to another one in
an import library is implemented with weak aliases. In that case,
we need to have the object file symbol level name for the target
of the import, as we make one object file symbol point at another
one. Therefore, we added an underscore to the ImportName field.

(This mechanism, with weak aliases, only works as long as the
target also is exported as is, in that form - this issue is
dealt with in a later commit.)

For clarity, for potentially handling the import renaming in
other ways, store the ImportName field unprefixed, containing
the actual name to import from the DLL.

When creating the aliases, add the prefix as needed. This requires
passing an extra AddUnderscores parameter to the writeImportLibrary
function; this is a temporary measure, until alias creation is
reworked in a later commit.

This doesn't preserve the corner case of checking !isDecorated()
before adding the prefix. This corner case isn't tested by any
of our existing tests, and only would trigger for
fastcall/vectorcall/MS C++ functions - while these kinds of
renames primarily are used in mingw-w64-crt import libraries
(which primarily handle cdecl and stdcall functions).</pre>
</div>
</content>
</entry>
<entry>
<title>[COFF] Rename the COFFShortExport::AliasTarget field. NFC. (#89039)</title>
<updated>2024-04-18T10:29:38+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2024-04-18T10:29:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=750de326ef0408df4a5f91773c355ded1a1b1b77'/>
<id>750de326ef0408df4a5f91773c355ded1a1b1b77</id>
<content type='text'>
It turns out that the previous name is vaguely misleading.

When operating on a def file like "symbolname == dllname", that is
supposed to make an import library entry, that when the symbol
"symbolname" links against this, it imports the DLL symbol "dllname"
from the referenced DLL. This doesn't need to involve any alias, and it
doesn't need to imply that "dllname" is available on its own as a
separate symbol in the import library at all.

GNU dlltool implements import libraries in the form of "long import
library", where each member is a regular object file with section chunks
that compose the relevant .idata section pieces. There, this kind of
import renaming does not involve any form of aliases, but the right
.idata section just gets a different string than the symbol name.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out that the previous name is vaguely misleading.

When operating on a def file like "symbolname == dllname", that is
supposed to make an import library entry, that when the symbol
"symbolname" links against this, it imports the DLL symbol "dllname"
from the referenced DLL. This doesn't need to involve any alias, and it
doesn't need to imply that "dllname" is available on its own as a
separate symbol in the import library at all.

GNU dlltool implements import libraries in the form of "long import
library", where each member is a regular object file with section chunks
that compose the relevant .idata section pieces. There, this kind of
import renaming does not involve any form of aliases, but the right
.idata section just gets a different string than the symbol name.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-lib][llvm-dlltool][Object] Add support for EXPORTAS name types. (#78772)</title>
<updated>2024-02-10T00:00:14+00:00</updated>
<author>
<name>Jacek Caban</name>
<email>jacek@codeweavers.com</email>
</author>
<published>2024-02-10T00:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8f23464a5d957242c89ca6f33d4379c42519cd81'/>
<id>8f23464a5d957242c89ca6f33d4379c42519cd81</id>
<content type='text'>
EXPORTAS is a new name type in import libraries. It's used by default on ARM64EC,
but it's allowed on other platforms as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EXPORTAS is a new name type in import libraries. It's used by default on ARM64EC,
but it's allowed on other platforms as well.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use StringRef::consume_front (NFC)</title>
<updated>2024-02-04T22:57:25+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-02-04T22:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=90e9c6e36e8b928240dfd61c2dfd30cf26108c07'/>
<id>90e9c6e36e8b928240dfd61c2dfd30cf26108c07</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)</title>
<updated>2023-12-12T05:01:36+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-12T05:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=586ecdf205aa8b3d162da6f955170a6736656615'/>
<id>586ecdf205aa8b3d162da6f955170a6736656615</id>
<content type='text'>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-dlltool] Implement the --no-leading-underscore option</title>
<updated>2023-06-09T18:29:05+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2023-06-07T11:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fb19fa2f3dfdd60d42c12ef28467d6f8f5149d6a'/>
<id>fb19fa2f3dfdd60d42c12ef28467d6f8f5149d6a</id>
<content type='text'>
This requires being able to opt out from adding the leading underscores
in COFFModuleDefinition. Normally it is added automatically for I386
type targets. We could either move the decision entirely to all
callers, letting the caller check the machine type and decide whether
underscores should be added, or keep the logic mostly as is, but allowing
opting out from the behaviour on I386.

I went with keeping the interface as is for now.

Differential Revision: https://reviews.llvm.org/D152363
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires being able to opt out from adding the leading underscores
in COFFModuleDefinition. Normally it is added automatically for I386
type targets. We could either move the decision entirely to all
callers, letting the caller check the machine type and decide whether
underscores should be added, or keep the logic mostly as is, but allowing
opting out from the behaviour on I386.

I went with keeping the interface as is for now.

Differential Revision: https://reviews.llvm.org/D152363
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup LLVMObject headers</title>
<updated>2022-02-10T20:13:44+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@redhat.com</email>
</author>
<published>2022-02-10T17:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e72c195fdcbe03ce1f728689e11716ec46a258ba'/>
<id>e72c195fdcbe03ce1f728689e11716ec46a258ba</id>
<content type='text'>
Most notably,

llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h
llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h
llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h

llvm-project preprocessed size:
before: 1068185081
after:  1068324320

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D119457
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most notably,

llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h
llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h
llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h

llvm-project preprocessed size:
before: 1068185081
after:  1068324320

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D119457
</pre>
</div>
</content>
</entry>
<entry>
<title>[Object] Deduplicate the three createError functions</title>
<updated>2021-10-11T14:36:57+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2021-10-11T14:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdc35b0efca9445950990fe642f18c3d82ab1299'/>
<id>bdc35b0efca9445950990fe642f18c3d82ab1299</id>
<content type='text'>
The Object library currently has three identical functions that translate a
Twine into a parser error. Until recently these functions have coexisted
peacefully, but since D110320 Clang with enabled modules is now diagnosing that
we have several definitions of `createError` in Object.

This patch just merges them all and puts them into Object's `Error.h` where the
error code for `parse_failed` is also defined which seems cleaner and unbreaks
the bots.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D111541
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Object library currently has three identical functions that translate a
Twine into a parser error. Until recently these functions have coexisted
peacefully, but since D110320 Clang with enabled modules is now diagnosing that
we have several definitions of `createError` in Object.

This patch just merges them all and puts them into Object's `Error.h` where the
error code for `parse_failed` is also defined which seems cleaner and unbreaks
the bots.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D111541
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Remove redundant "std::move"s in return statements"</title>
<updated>2020-02-10T15:07:40+00:00</updated>
<author>
<name>Bill Wendling</name>
<email>isanbard@gmail.com</email>
</author>
<published>2020-02-10T15:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c55cf4afa9161bb4413b7ca9933d553327f5f069'/>
<id>c55cf4afa9161bb4413b7ca9933d553327f5f069</id>
<content type='text'>
The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
</pre>
</div>
</content>
</entry>
</feed>
