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

Change DIBuilderCreateEnumerator signature to match LLVM 9 #69734

Merged
merged 3 commits into from
Mar 9, 2020

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Mar 5, 2020

  • Change DIBuilderCreateEnumerator signature to match LLVM 9 C API.
  • Use provided is unsigned flag when emitting enumerators.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ecstatic-morse (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2020
Copy link
Contributor

@ecstatic-morse ecstatic-morse left a comment

Choose a reason for hiding this comment

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

Some questions about ownership need to be resolved before this is merged. Also left a nit about using as casts for discriminants.

src/librustc_codegen_llvm/debuginfo/metadata.rs Outdated Show resolved Hide resolved
@ecstatic-morse
Copy link
Contributor

Thanks @tmiasko! LGTM, although I'm gonna defer to someone who works on this code, since I don't quite understand why this worked before if we were using the wrong signature.

r? @nagisa

@tmiasko
Copy link
Contributor Author

tmiasko commented Mar 5, 2020

Oh sorry, I didn't made it clear in PR description. The PR prepares for migration
to the C API that is available since LLVM 9, without actually mgirating it yet, sice
we support older versions of LLVM.

Thus the code continues to use own wrapper LLVMRustDIBuilderCreateEnumerator rather than
official one LLVMDIBuilderCreateEnumerator, but now they have exactly the same type
signature and arguments.

@ecstatic-morse
Copy link
Contributor

Ah, I see now.

r? @ecstatic-morse
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 5, 2020

📌 Commit 30650f8 has been approved by ecstatic-morse

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2020
@ecstatic-morse
Copy link
Contributor

Note to self: llvm::StringRef explicitly does not require the string to be null-terminated. It does, however, have a const char* constructor for null-terminated strings, which is what we were using prior to this PR.

bors added a commit that referenced this pull request Mar 8, 2020
Rollup of 7 pull requests

Successful merges:

 - #69120 (Don't give invalid suggestion on desugared span.)
 - #69326 (mir-interpret: add method to read wide strings from Memory)
 - #69608 (Expose target libdir information via print command)
 - #69734 (Change DIBuilderCreateEnumerator signature to match LLVM 9)
 - #69800 (Compile address sanitizer test with debuginfo)
 - #69807 (Cleanup E0391 explanation)
 - #69820 (clean up E0392 explanation)

Failed merges:

r? @ghost
@bors bors merged commit e2617a9 into rust-lang:master Mar 9, 2020
@tmiasko tmiasko deleted the di-enumerator branch March 9, 2020 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants