LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 22780 - Drop fake DW_TAG_expression
Summary: Drop fake DW_TAG_expression
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: DebugInfo (show other bugs)
Version: trunk
Hardware: PC All
: P normal
Assignee: Duncan
URL:
Keywords:
Depends on:
Blocks: 21432
  Show dependency tree
 
Reported: 2015-03-03 18:59 PST by Duncan
Modified: 2017-08-29 16:00 PDT (History)
7 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2015-03-03 18:59:11 PST
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.
Comment 1 Duncan 2015-03-17 16:37:48 PDT
r232550 does steps #2 and #3 in one commit (I skipped step #1).

I'll leave this open to track #4.
Comment 2 Duncan 2015-08-19 16:06:06 PDT
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.
Comment 3 Reid Kleckner 2017-08-29 16:00:58 PDT
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.