From ab44ce3d598882e51a25eb82eb7ae6308de85ae6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 29 May 2017 16:25:25 +0000 Subject: Vendor import of llvm trunk r304149: https://llvm.org/svn/llvm-project/llvm/trunk@304149 --- include/llvm/IR/Metadata.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/llvm/IR/Metadata.h') diff --git a/include/llvm/IR/Metadata.h b/include/llvm/IR/Metadata.h index 92f701e01ff3..3c753260190e 100644 --- a/include/llvm/IR/Metadata.h +++ b/include/llvm/IR/Metadata.h @@ -1223,6 +1223,7 @@ public: // FIXME: Fix callers and remove condition on N. unsigned size() const { return N ? N->getNumOperands() : 0u; } + bool empty() const { return N ? N->getNumOperands() == 0 : true; } T *operator[](unsigned I) const { return cast_or_null(N->getOperand(I)); } // FIXME: Fix callers and remove condition on N. -- cgit v1.2.3