mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc()
Change `Instruction::getAllMetadataOtherThanDebugLoc()` from a vector of `MDNode` to one of `Value`. Part of PR21433. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -188,12 +188,12 @@ static void propagateIRFlags(Value *I, ArrayRef<Value *> VL) {
|
||||
/// \returns \p I after propagating metadata from \p VL.
|
||||
static Instruction *propagateMetadata(Instruction *I, ArrayRef<Value *> VL) {
|
||||
Instruction *I0 = cast<Instruction>(VL[0]);
|
||||
SmallVector<std::pair<unsigned, MDNode *>, 4> Metadata;
|
||||
SmallVector<std::pair<unsigned, Value *>, 4> Metadata;
|
||||
I0->getAllMetadataOtherThanDebugLoc(Metadata);
|
||||
|
||||
for (unsigned i = 0, n = Metadata.size(); i != n; ++i) {
|
||||
unsigned Kind = Metadata[i].first;
|
||||
MDNode *MD = Metadata[i].second;
|
||||
MDNode *MD = cast_or_null<MDNode>(Metadata[i].second);
|
||||
|
||||
for (int i = 1, e = VL.size(); MD && i != e; i++) {
|
||||
Instruction *I = cast<Instruction>(VL[i]);
|
||||
|
||||
Reference in New Issue
Block a user