Now that we have a type hierarchy (from bug 22464), we don't need `DW_TAG_expression` to discriminate DWARF expressions. We can use `Metadata::getMetadataID()` instead. 1. Change `MDExpression::getTag()` to return `0u` and fix any fallout. 2. Remove `dwarf::DW_TAG_expression`. 3. Change `MDExpression` to inherit directly from `MDNode` instead of `DebugNode`. 4. Investigate having it inherit directly from `Metadata` -- expressions don't need/use metadata operands, they're not referenced from `NamedMDNode` or `!attachments`, and they have no need for distinct/temporary semantics.
r232550 does steps #2 and #3 in one commit (I skipped step #1). I'll leave this open to track #4.
There aren't very many MDExpressions -- I haven't seen MDExpression in any memory profile -- so step #4 doesn't seem urgent. Since r232550 fixed the real problem, leaving the PR around is just noise at this point. Closing.
I started implementing step #4 of making DIExpression not be an MDNode in https://reviews.llvm.org/D37281, but I'm going to abandon it. It doesn't seem worth it.