summaryrefslogtreecommitdiff
path: root/lib/DebugInfo
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-15 18:47:07 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-15 18:47:07 +0000
commit571832b930951b0d8d73f0cafea77fd23b225baf (patch)
tree34cf4ad94c9f6d10893a0a646ccbe0043579ea22 /lib/DebugInfo
parent80d3b1e7087421008df3c6794b60beaf395efbeb (diff)
downloadllvm-571832b930951b0d8d73f0cafea77fd23b225baf.tar.gz
llvm-571832b930951b0d8d73f0cafea77fd23b225baf.tar.bz2
llvm-571832b930951b0d8d73f0cafea77fd23b225baf.tar.xz
Make some assertions on constant expressions static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r--lib/DebugInfo/DWARFDebugArangeSet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/DebugInfo/DWARFDebugArangeSet.cpp b/lib/DebugInfo/DWARFDebugArangeSet.cpp
index 8459cb1378..c0a33ceaf2 100644
--- a/lib/DebugInfo/DWARFDebugArangeSet.cpp
+++ b/lib/DebugInfo/DWARFDebugArangeSet.cpp
@@ -67,7 +67,9 @@ DWARFDebugArangeSet::extract(DataExtractor data, uint32_t *offset_ptr) {
Descriptor arangeDescriptor;
- assert(sizeof(arangeDescriptor.Address) == sizeof(arangeDescriptor.Length));
+ static_assert(sizeof(arangeDescriptor.Address) ==
+ sizeof(arangeDescriptor.Length),
+ "Different datatypes for addresses and sizes!");
assert(sizeof(arangeDescriptor.Address) >= HeaderData.AddrSize);
while (data.isValidOffset(*offset_ptr)) {