From 2f6ad4d3c3a222b713ff0204859ff1c3cc249120 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 1 Mar 2007 17:47:31 +0000 Subject: Make the static table of results in sqrt const. llvm-svn: 34791 --- llvm/lib/Support/APInt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 50b0dc34fea..da8e77a7a0e 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -1190,7 +1190,7 @@ APInt APInt::sqrt() const { // Use a fast table for some small values. This also gets rid of some // rounding errors in libc sqrt for small values. if (magnitude <= 5) { - static uint8_t results[32] = { + static const uint8_t results[32] = { /* 0 */ 0, /* 1- 2 */ 1, 1, /* 3- 6 */ 2, 2, 2, 2, -- cgit v1.2.3