From 201a48471b38dfe994dc6a25077b667d3ff0fd59 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 1 Mar 2015 23:56:19 +0000 Subject: [PATCH] Fix a really bad typo in my last commit. llvm-svn: 230922 --- llvm/include/llvm/ADT/ArrayRef.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h index e973054daefb..f7b055e3a060 100644 --- a/llvm/include/llvm/ADT/ArrayRef.h +++ b/llvm/include/llvm/ADT/ArrayRef.h @@ -135,8 +135,10 @@ namespace llvm { /// equals - Check for element-wise equality. bool equals(ArrayRef RHS) const { - if (Length != RHS.Length || Length == 0) + if (Length != RHS.Length) return false; + if (Length == 0) + return true; return std::equal(begin(), end(), RHS.begin()); }