-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[LLVM 4.0] Update LLVM global variable debug info API for 4.0 #38295
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
7294ecd
to
c8be658
Compare
This will bring us closer to upgrading to LLVM 4.0 in #37609 |
Constant *InitVal = cast<Constant>(unwrap(Val)); | ||
|
||
#if LLVM_VERSION_GE(4, 0) | ||
llvm::DIExpression *InitExpr = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these are 3 spaces instead of 4?
FYI, this will have some conflicts with #38317.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
||
#if LLVM_VERSION_GE(4, 0) | ||
llvm::DIExpression *InitExpr = nullptr; | ||
if (llvm::ConstantInt *IntVal = llvm::dyn_cast<llvm::ConstantInt>(InitVal)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have braces on the if
clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
c8be658
to
5b2b712
Compare
@bors r+ Thanks for the PR! |
📌 Commit 5b2b712 has been approved by |
☔ The latest upstream changes (presumably #38317) made this pull request unmergeable. Please resolve the merge conflicts. |
This teaches Rust about an LLVM 4.0 API change for creating debug info for global variables. This change was made in upstream LLVM patch https://reviews.llvm.org/D20147 This is almost 1:1 copy of how clang did it in http://reviews.llvm.org/D20415
5b2b712
to
e080804
Compare
Rebased on top of master |
@bors r+ |
📌 Commit e080804 has been approved by |
…rister [LLVM 4.0] Update LLVM global variable debug info API for 4.0 This teaches Rust about an LLVM 4.0 API change for creating debug info for global variables. This change was made in upstream LLVM patch https://reviews.llvm.org/D20147 This is almost a 1:1 copy of how clang did it in http://reviews.llvm.org/D20415
This teaches Rust about an LLVM 4.0 API change for creating debug info
for global variables.
This change was made in upstream LLVM patch https://reviews.llvm.org/D20147
This is almost a 1:1 copy of how clang did it in http://reviews.llvm.org/D20415