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

mark glue functions with unnamed_addr #6787

Closed
wants to merge 2 commits into from
Closed

mark glue functions with unnamed_addr #6787

wants to merge 2 commits into from

Conversation

thestinger
Copy link
Contributor

This doesn't do anything with our current LLVM passes, but it's easy to do, and with -mergefunc enabled it no longer has to output stubs to maintain addresses for each glue function.

pub fn SetLinkage(Global: ValueRef, Link: Linkage) {
unsafe {
llvm::LLVMSetLinkage(Global, Link as c_uint);
}
}

pub fn set_unnamed_addr(global: ValueRef, value: bool) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this follow the same convention as all the other bindings? That is SetUnnamedAddr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, that seems like a legacy wart since we're using that convention for types now. I'm open to changing it though if we really want to be using that convention.

@thestinger thestinger closed this May 29, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 11, 2021
tests: add test that roughly ensures that our lint messages conform with the diagnostics convention of the rustc dev guide

lint message should not start with uppercase letters
lint messages should not have punctuation at the end of the last line

https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure

The test reads through all the .stderr files in the testsuit and checks lint messages that start with "help: ", "error: " etc.
There is also an exception list for special messages that are deemed acceptable.

changelog: make sure lint messages conform with the rustc dev guide and add test
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.

3 participants