We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 145b4a3 commit 71cf592Copy full SHA for 71cf592
llvm/lib/IR/Attributes.cpp
@@ -2292,10 +2292,10 @@ AttrBuilder &AttrBuilder::addInitializesAttr(const ConstantRangeList &CRL) {
2292
}
2293
2294
AttrBuilder &AttrBuilder::addFromEquivalentMetadata(const Instruction &I) {
2295
- if (const MDNode *NonNull = I.getMetadata(LLVMContext::MD_nonnull))
+ if (I.hasMetadata(LLVMContext::MD_nonnull))
2296
addAttribute(Attribute::NonNull);
2297
2298
- if (const MDNode *NoUndef = I.getMetadata(LLVMContext::MD_noundef))
+ if (I.hasMetadata(LLVMContext::MD_noundef))
2299
addAttribute(Attribute::NoUndef);
2300
2301
if (const MDNode *Align = I.getMetadata(LLVMContext::MD_align)) {
0 commit comments