Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/IR/Verifier.cpp
Show First 20 Lines • Show All 4,770 Lines • ▼ Show 20 Lines | void Verifier::visitConstrainedFPIntrinsic(ConstrainedFPIntrinsic &FPI) { | ||||
} | } | ||||
// If a non-metadata argument is passed in a metadata slot then the | // If a non-metadata argument is passed in a metadata slot then the | ||||
// error will be caught earlier when the incorrect argument doesn't | // error will be caught earlier when the incorrect argument doesn't | ||||
// match the specification in the intrinsic call table. Thus, no | // match the specification in the intrinsic call table. Thus, no | ||||
// argument type check is needed here. | // argument type check is needed here. | ||||
if (HasExceptionMD) { | if (HasExceptionMD) { | ||||
Assert(FPI.getExceptionBehavior() != ConstrainedFPIntrinsic::ebInvalid, | Assert(FPI.getExceptionBehavior().hasValue(), | ||||
"invalid exception behavior argument", &FPI); | "invalid exception behavior argument", &FPI); | ||||
} | } | ||||
if (HasRoundingMD) { | if (HasRoundingMD) { | ||||
Assert(FPI.getRoundingMode() != ConstrainedFPIntrinsic::rmInvalid, | Assert(FPI.getRoundingMode().hasValue(), | ||||
"invalid rounding mode argument", &FPI); | "invalid rounding mode argument", &FPI); | ||||
} | } | ||||
} | } | ||||
void Verifier::visitDbgIntrinsic(StringRef Kind, DbgVariableIntrinsic &DII) { | void Verifier::visitDbgIntrinsic(StringRef Kind, DbgVariableIntrinsic &DII) { | ||||
auto *MD = cast<MetadataAsValue>(DII.getArgOperand(0))->getMetadata(); | auto *MD = cast<MetadataAsValue>(DII.getArgOperand(0))->getMetadata(); | ||||
AssertDI(isa<ValueAsMetadata>(MD) || | AssertDI(isa<ValueAsMetadata>(MD) || | ||||
(isa<MDNode>(MD) && !cast<MDNode>(MD)->getNumOperands()), | (isa<MDNode>(MD) && !cast<MDNode>(MD)->getNumOperands()), | ||||
▲ Show 20 Lines • Show All 643 Lines • Show Last 20 Lines |