mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-09 20:34:54 +00:00
[libunwind] Remove dubious template function. NFC.
Per review by Don Hinton. llvm-svn: 321448
This commit is contained in:
parent
0ca61e8ae3
commit
99bbb213b5
@ -25,10 +25,6 @@
|
||||
|
||||
namespace libunwind {
|
||||
|
||||
// Avoid relying on C++ headers.
|
||||
template <class T>
|
||||
static constexpr T pint_max_value() { return ~0; }
|
||||
|
||||
/// CFI_Parser does basic parsing of a CFI (Call Frame Information) records.
|
||||
/// See DWARF Spec for details:
|
||||
/// http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
|
||||
@ -543,7 +539,7 @@ bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions,
|
||||
results->cfaRegister = 0;
|
||||
results->cfaExpression = (int64_t)p;
|
||||
length = addressSpace.getULEB128(p, instructionsEnd);
|
||||
assert(length < pint_max_value<pint_t>() && "pointer overflow");
|
||||
assert(length < static_cast<pint_t>(~0) && "pointer overflow");
|
||||
p += static_cast<pint_t>(length);
|
||||
_LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_expression(expression=0x%" PRIx64
|
||||
", length=%" PRIu64 ")\n",
|
||||
@ -559,7 +555,7 @@ bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions,
|
||||
results->savedRegisters[reg].location = kRegisterAtExpression;
|
||||
results->savedRegisters[reg].value = (int64_t)p;
|
||||
length = addressSpace.getULEB128(p, instructionsEnd);
|
||||
assert(length < pint_max_value<pint_t>() && "pointer overflow");
|
||||
assert(length < static_cast<pint_t>(~0) && "pointer overflow");
|
||||
p += static_cast<pint_t>(length);
|
||||
_LIBUNWIND_TRACE_DWARF("DW_CFA_expression(reg=%" PRIu64 ", "
|
||||
"expression=0x%" PRIx64 ", "
|
||||
@ -645,7 +641,7 @@ bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions,
|
||||
results->savedRegisters[reg].location = kRegisterIsExpression;
|
||||
results->savedRegisters[reg].value = (int64_t)p;
|
||||
length = addressSpace.getULEB128(p, instructionsEnd);
|
||||
assert(length < pint_max_value<pint_t>() && "pointer overflow");
|
||||
assert(length < static_cast<pint_t>(~0) && "pointer overflow");
|
||||
p += static_cast<pint_t>(length);
|
||||
_LIBUNWIND_TRACE_DWARF("DW_CFA_val_expression(reg=%" PRIu64 ", "
|
||||
"expression=0x%" PRIx64 ", length=%" PRIu64 ")\n",
|
||||
|
Loading…
Reference in New Issue
Block a user