DWARFFormValue: Add getAsSignedConstant method.
authorFrederic Riss <friss@apple.com>
Wed, 4 Mar 2015 22:07:41 +0000 (22:07 +0000)
committerFrederic Riss <friss@apple.com>
Wed, 4 Mar 2015 22:07:41 +0000 (22:07 +0000)
commit17b56820945fbd121017fae0169203471bc39455
tree8f2453c1dd64fe9762048b69ccc676afebae9254
parent13d5de32acfddbb6ebfefe716ebae71cb5216540
DWARFFormValue: Add getAsSignedConstant method.

The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231299 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/DWARF/DWARFFormValue.h
lib/DebugInfo/DWARF/DWARFFormValue.cpp
unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp