Commit 180eae1f authored by Nikita Popov's avatar Nikita Popov
Browse files

[MemoryBuiltins] Simplify getAllocFnKind() implementation (NFC)

parent 3fd5113c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -282,10 +282,7 @@ static AllocFnKind getAllocFnKind(const Value *V) {
}

static AllocFnKind getAllocFnKind(const Function *F) {
  Attribute Attr = F->getFnAttribute(Attribute::AllocKind);
  if (Attr.isValid())
    return AllocFnKind(Attr.getValueAsInt());
  return AllocFnKind::Unknown;
  return F->getAttributes().getAllocKind();
}

static bool checkFnAllocKind(const Value *V, AllocFnKind Wanted) {