File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -503,10 +503,6 @@ class Instruction : public User,
503
503
// / Determine whether the the nneg flag is set.
504
504
bool hasNonNeg () const LLVM_READONLY;
505
505
506
- // / Metadata IDs that may generate poison.
507
- constexpr static const unsigned PoisonGeneratingMetadataIDs[] = {
508
- LLVMContext::MD_range, LLVMContext::MD_nonnull, LLVMContext::MD_align};
509
-
510
506
// / Return true if this operator has flags which may cause this instruction
511
507
// / to evaluate to poison despite having non-poison inputs.
512
508
bool hasPoisonGeneratingFlags () const LLVM_READONLY;
Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ class Metadata {
138
138
void printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST,
139
139
const Module *M = nullptr ) const ;
140
140
// / @}
141
+
142
+ // / Metadata IDs that may generate poison.
143
+ constexpr static const unsigned PoisonGeneratingIDs[] = {
144
+ LLVMContext::MD_range, LLVMContext::MD_nonnull, LLVMContext::MD_align};
141
145
};
142
146
143
147
// Create wrappers for C Binding types (see CBindingWrapping.h).
Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ void Instruction::dropPoisonGeneratingFlags() {
458
458
}
459
459
460
460
bool Instruction::hasPoisonGeneratingMetadata () const {
461
- return any_of (PoisonGeneratingMetadataIDs ,
461
+ return any_of (Metadata::PoisonGeneratingIDs ,
462
462
[this ](unsigned ID) { return hasMetadata (ID); });
463
463
}
464
464
@@ -486,7 +486,7 @@ bool Instruction::hasNonDebugLocLoopMetadata() const {
486
486
}
487
487
488
488
void Instruction::dropPoisonGeneratingMetadata () {
489
- for (unsigned ID : PoisonGeneratingMetadataIDs )
489
+ for (unsigned ID : Metadata::PoisonGeneratingIDs )
490
490
eraseMetadata (ID);
491
491
}
492
492
You can’t perform that action at this time.
0 commit comments