llvm: replace some deprecated functions#130389
Conversation
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in compiler/rustc_codegen_gcc |
|
☔ The latest upstream changes (presumably #130519) made this pull request unmergeable. Please resolve the merge conflicts. |
475d65c to
b7c5656
Compare
| ); | ||
| let md = llvm::LLVMMDNodeInContext2(self.cx.llcx, v.as_ptr(), v.len()); | ||
| let md = llvm::LLVMMetadataAsValue(&self.llcx, md); | ||
| llvm::LLVMSetMetadata(load, llvm::MD_range as c_uint, md); |
There was a problem hiding this comment.
Can we add a set_metadata method that does the LLVMMetadataAsValue + LLVMSetMetadata dance?
LLVM should really allow setting the metadata without first wrapping it in a value and then unwrapping again, but we can at least hide this...
| } | ||
|
|
||
| /// A wrapper for [`llvm::LLVMSetMetadata`], but it takes `Metadata` as a parameter instead of `Value`. | ||
| pub(crate) fn set_metadata<'a>(&self, val: &'a Value, kind_id: c_uint, md: &'a Metadata) { |
There was a problem hiding this comment.
Accept MetadataType here and move the c_uint cast into the method?
|
@bors r+ rollup |
llvm: replace some deprecated functions `LLVMMDStringInContext` and `LLVMMDNodeInContext` are deprecated, replace them with `LLVMMDStringInContext2` and `LLVMMDNodeInContext2`. Also replace `Value` with `Metadata` in some function signatures for better consistency.
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
I can't reproduce the error with |
|
Ah crap, I didn't realize that bors retry also retires try builds. I'll just let it run to avoid confusing bors further. |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
Huh, and now it failed again. So probably something is legitimately wrong with this patch that makes things break non-deterministically -- but I'm not able to spot it. |
|
Okay, this test has been failing on some other PRs as well, I filed #130656. |
|
Problematic test has been removed, try again... @bors r+ |
|
💡 This pull request was already approved, no need to approve it again.
|
|
seems that it needs to run |
llvm: replace some deprecated functions `LLVMMDStringInContext` and `LLVMMDNodeInContext` are deprecated, replace them with `LLVMMDStringInContext2` and `LLVMMDNodeInContext2`. Also replace `Value` with `Metadata` in some function signatures for better consistency.
This comment has been minimized.
This comment has been minimized.
|
@bors r=nikic |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (4cbfcf1): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -3.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 1.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 770.84s -> 769.56s (-0.17%) |
llvm: replace some deprecated functions `LLVMMDStringInContext` and `LLVMMDNodeInContext` are deprecated, replace them with `LLVMMDStringInContext2` and `LLVMMDNodeInContext2`. Also replace `Value` with `Metadata` in some function signatures for better consistency.
LLVMMDStringInContextandLLVMMDNodeInContextare deprecated, replace them withLLVMMDStringInContext2andLLVMMDNodeInContext2.Also replace
ValuewithMetadatain some function signatures for better consistency.