From d53e70262dba7d67668a2516e731085d27610ed7 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 19 Dec 2017 00:05:10 +0000 Subject: TargetLowering: Fix off-by-one error This problem was present for a while, but somehow asan didn't catch it before the refactoring in r321036. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321043 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/TargetLowering.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/CodeGen/TargetLowering.h b/include/llvm/CodeGen/TargetLowering.h index deeb57da5d1..4cf589e0c75 100644 --- a/include/llvm/CodeGen/TargetLowering.h +++ b/include/llvm/CodeGen/TargetLowering.h @@ -2429,7 +2429,7 @@ private: PromoteToType; /// Stores the name each libcall. - const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL]; + const char *LibcallRoutineNames[RTLIB::UNKNOWN_LIBCALL + 1]; /// The ISD::CondCode that should be used to test the result of each of the /// comparison libcall against zero. -- cgit v1.2.3