Duncan P. N. Exon Smith d33fbe4f07 IR: Enable debug info type ODR uniquing for forward decls
Add a new method, DICompositeType::buildODRType, that will create or
mutate the DICompositeType for a given ODR identifier, and use it in
LLParser and BitcodeReader instead of DICompositeType::getODRType.

The logic is as follows:

  - If there's no node, create one with the given arguments.
  - Else, if the current node is a forward declaration and the new
    arguments would create a definition, mutate the node to match the
    new arguments.
  - Else, return the old node.

This adds a missing feature supported by the current DITypeIdentifierMap
(which I'm slowly making redudant).  The only remaining difference is
that the DITypeIdentifierMap has a "the-last-one-wins" rule, whereas
DICompositeType::buildODRType has a "the-first-one-wins" rule.

For now I'm leaving behind DICompositeType::getODRType since it has
obvious, low-level semantics that are convenient for unit testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 18:00:19 +00:00
..
2016-01-20 22:05:50 +00:00
2015-12-10 14:19:35 +00:00
2016-03-24 00:06:03 +00:00
2015-12-01 15:19:48 +00:00
2015-12-01 15:19:48 +00:00
2015-12-01 15:19:48 +00:00
2015-11-27 23:21:45 +00:00
2015-12-07 16:31:41 +00:00
2015-11-30 18:54:24 +00:00
2015-12-01 15:46:46 +00:00
2015-12-08 02:29:45 +00:00
2015-12-07 16:31:41 +00:00
2015-11-29 14:53:06 +00:00
2015-12-07 16:31:41 +00:00
2015-12-07 16:31:41 +00:00
2015-12-07 16:31:41 +00:00