HomePhabricator

Fix an assertion failure in DwarfExpression's subregister composition

Authored by aprantl on Jan 17 2020, 10:38 AM.

Description

Fix an assertion failure in DwarfExpression's subregister composition

This patch fixes an assertion failure in DwarfExpression that is
triggered when a complex fragment has exactly the size of a
subregister of the register the DBG_VALUE points to *and* there is no
DWARF encoding for the super-register.

I took the opportunity to replace/document some magic values with
static constructor functions to make this code less confusing to read.

rdar://problem/58489125

Differential Revision: https://reviews.llvm.org/D72938