From 95dade523a2d0ed646f08c044cf22099a1bfd6a5 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 3 Apr 2018 05:10:12 +0000 Subject: [PATCH] [TableGen] Use llvm::cast instead of static_cast so that the cast will be checked. NFC llvm-svn: 329045 --- llvm/utils/TableGen/X86RecognizableInstr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index 44b798cfdcaa..a387efb7ebcf 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -40,7 +40,7 @@ static uint8_t byteFromBitsInit(BitsInit &init) { uint8_t ret = 0; for (index = 0; index < width; index++) { - if (static_cast(init.getBit(index))->getValue()) + if (cast(init.getBit(index))->getValue()) ret |= mask; mask <<= 1;