With D149881, we converted EntryValue MachineFunction table entries into
DbgVariables initialized by a "DbgValue" intrinsic, which can only handle a
single, non-fragment DIExpression. However, it is desirable to handle variables
with multiple fragments and DIExpressions.
To do this, we expand the DbgVariable class to handle the EntryValue case.
This class can already operate under three different "modes" (stack slot,
unchanging location described by a dbg value, changing location described by a
loc list). A fourth case is added as a separate class entirely, but a subsequent
patch should redesign DbgVariable with four subclasses in order to make the
code more readable.
This patch also exposed a bug in the beginEntryValueExpression function, which
was not initializing the LocationFlags properly. Note how the
finalizeEntryValue function resets that flag. We fix this bug here, as testing
this changing in isolation would be tricky.
FYI I recommend looking at DwarfDebug.h and DwarfDebug.cpp before looking at the other files.