Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextAPI] Add DylibReader #75006

Merged
merged 3 commits into from
Dec 13, 2023
Merged

[TextAPI] Add DylibReader #75006

merged 3 commits into from
Dec 13, 2023

Conversation

cyndyishida
Copy link
Member

Add support for reading binary Mach-o dynamic libraries. It uses libObject APIs for extracting information relavant to TAPI and tbd files. This includes but is not limited to load commands encode data like install names, current/compat versions and symbols.

Add support for reading binary Mach-o dynamic libraries. It uses
libObject APIs for extracting information relavant to TAPI and tbd
files. This includes but is not limited to load commands encode data
like install names, current/compat versions and symbols.
llvm/include/llvm/TextAPI/DylibReader.h Outdated Show resolved Hide resolved
@@ -103,6 +103,10 @@ class GlobalRecord : public Record {

bool isFunction() const { return GV == Kind::Function; }
bool isVariable() const { return GV == Kind::Variable; }
void setKind(const Kind &V) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I would prefer to pass the argument by value. It is only an uint8_t enum. There is no need to pass it by reference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree, I also wanted to keep the const mostly to ensure that the passed value isn't modified, just assigned. But that puts us back to #75006 (comment)

llvm/include/llvm/TextAPI/DylibReader.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ributzka ributzka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyndyishida cyndyishida merged commit 634fedd into main Dec 13, 2023
4 checks passed
@cyndyishida cyndyishida deleted the users/cyndyishida/TAPIStubifyp1 branch December 13, 2023 03:50
cyndyishida added a commit that referenced this pull request Dec 13, 2023
…ylibReader (#75006)"

This reverts commit aa217eb.
This reverts commit 634fedd.

This breaks buildbots by introducing cycle dependency between libObject
and TextAPI and breaks gcc compiles on buildbots.
cyndyishida added a commit to cyndyishida/llvm-project that referenced this pull request Jan 4, 2024
Add support for reading binary Mach-o dynamic libraries. It uses
libObject APIs for extracting information relavant to TAPI and tbd
files. This includes but is not limited to load commands encode data
like install names, current/compat versions and symbols.

(cherry picked from commit 634fedd)
cyndyishida added a commit to cyndyishida/llvm-project that referenced this pull request Jan 4, 2024
…ylibReader (llvm#75006)"

This reverts commit aa217eb.
This reverts commit 634fedd.

This breaks buildbots by introducing cycle dependency between libObject
and TextAPI and breaks gcc compiles on buildbots.

(cherry picked from commit 1fef0fa)
cyndyishida added a commit to apple/llvm-project that referenced this pull request Jan 5, 2024
Add support for reading binary Mach-o dynamic libraries. It uses
libObject APIs for extracting information relavant to TAPI and tbd
files. This includes but is not limited to load commands encode data
like install names, current/compat versions and symbols.

(cherry picked from commit 634fedd)
cyndyishida added a commit to apple/llvm-project that referenced this pull request Jan 5, 2024
…ylibReader (llvm#75006)"

This reverts commit aa217eb.
This reverts commit 634fedd.

This breaks buildbots by introducing cycle dependency between libObject
and TextAPI and breaks gcc compiles on buildbots.

(cherry picked from commit 1fef0fa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants