Skip to content

Conversation

@andykaylor
Copy link
Collaborator

This change moves all declarations of emit* functions in CIRGenFunction.h into a common location and sorts them alphabetically. The goal of this change is to make it easier to keep upstream and incubator code in a consistent location, making functions easier to find for upstreaming and minimizing conflicts in the incubator when rebasing.

I did most of this sort manually, and I've probably been inconsistent in how I treat sorting of uppercase versus lowercase. I made no attempt to provide a rule for ordering different declarations of functions with the same name. We can improve on that over time if anyone feels the need.

I tried very hard not to drop comments (one of the reasons I had to do this manually), but I may have lost a few.

This change loses the grouping of some declarations that were co-located by common purpose, but most of the declarations lacked a coherent ordering, so I think this is a step forward overall.

This change moves all declarations of emit* functions in CIRGenFunction.h
into a common location and sorts them alphabetically. The goal of this change
is to make it easier to keep upstream and incubator code in a consistent
location, making functions easier to find for upstreaming and minimizing
conflicts in the incubator when rebasing.

I did most of this sort manually, and I've probably been inconsistent in
how I treat sorting of uppercase versus lowercase. I made no attempt to
provide a rule for ordering different declarations of functions with the
same name. We can improve on that over time if anyone feels the need.

This change loses the grouping of some declarations that were co-located by
common purpose, but most of the declarations lacked a coherent ordering, so
I think this is a step forward overall.
@github-actions
Copy link

github-actions bot commented Mar 25, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge once clang-format is happy!

@andykaylor andykaylor merged commit 4d2fb6c into llvm:main Mar 25, 2025
9 checks passed
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
This change moves all declarations of emit* functions in
CIRGenFunction.h into a common location and sorts them alphabetically.
The goal of this change is to make it easier to keep upstream and
incubator code in a consistent location, making functions easier to find
for upstreaming and minimizing conflicts in the incubator when rebasing.

I did most of this sort manually, and I've probably been inconsistent in
how I treat sorting of uppercase versus lowercase. I made no attempt to
provide a rule for ordering different declarations of functions with the
same name. We can improve on that over time if anyone feels the need.

I tried very hard not to drop comments (one of the reasons I had to do
this manually), but I may have lost a few.

This change loses the grouping of some declarations that were co-located
by common purpose, but most of the declarations lacked a coherent
ordering, so I think this is a step forward overall.
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.

2 participants