hanchenye-llvm-project/llvm/lib/AsmParser
Duncan P. N. Exon Smith 9738602869 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.

llvm-svn: 266786
2016-04-19 18:00:19 +00:00
..
CMakeLists.txt modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
LLLexer.cpp Add the allocsize attribute to LLVM. 2016-04-12 01:05:35 +00:00
LLLexer.h
LLParser.cpp IR: Enable debug info type ODR uniquing for forward decls 2016-04-19 18:00:19 +00:00
LLParser.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LLToken.h Add the allocsize attribute to LLVM. 2016-04-12 01:05:35 +00:00
LLVMBuild.txt
Parser.cpp [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00