[llvm] Replacing asserts with static_asserts where appropriate

Summary:
This patch consists of the suggestions of clang-tidy/misc-static-assert check.


Reviewers: alexfh

Reviewed By: alexfh

Subscribers: xazax.hun, llvm-commits

Differential Revision: http://reviews.llvm.org/D8343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Horvath
2015-03-16 09:53:42 +00:00
parent 828c4066dd
commit 1fc0a8da34
8 changed files with 17 additions and 9 deletions

View File

@@ -243,7 +243,9 @@ std::pair<MCSymbol *, MCSymbol *> MCDwarfLineTableHeader::Emit(MCStreamer *MCOS)
0, // length of DW_LNS_set_epilogue_begin
1 // DW_LNS_set_isa
};
assert(array_lengthof(StandardOpcodeLengths) == (DWARF2_LINE_OPCODE_BASE - 1));
static_assert(array_lengthof(StandardOpcodeLengths) ==
(DWARF2_LINE_OPCODE_BASE - 1),
"");
return Emit(MCOS, StandardOpcodeLengths);
}