git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374554
91177308-0d34-0410-b5e6-
96231b3b80d8
uint64_t Val = cast<ConstantInt>(
cast<ConstantAsMetadata>(MD->getOperand(0))->getValue())
->getZExtValue();
- assert((Val >= 0 && Val <= 2) && "unknown vcall visibility!");
+ assert(Val <= 2 && "unknown vcall visibility!");
return (VCallVisibility)Val;
}
return VCallVisibility::VCallVisibilityPublic;
// unit, we know that we can see all virtual functions which might use it,
// so VFE is safe.
if (auto GO = dyn_cast<GlobalObject>(&GV)) {
- GlobalObject::VCallVisibility TypeVis = GV.getVCallVisibility();
+ GlobalObject::VCallVisibility TypeVis = GO->getVCallVisibility();
if (TypeVis == GlobalObject::VCallVisibilityTranslationUnit ||
(LTOPostLink &&
TypeVis == GlobalObject::VCallVisibilityLinkageUnit)) {