1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib/AsmParser
Duncan P. N. Exon Smith a2835fc0fd Optimize metadata node fields for CHECK-ability
While gaining practical experience hand-updating CHECK lines (for moving
the new debug info hierarchy into place),  I learnt a few things about
CHECK-ability of the specialized node assembly output.

  - The first part of a `CHECK:` is to identify the "right" node (this
    is especially true if you intend to use the new `CHECK-SAME`
    feature, since the first CHECK needs to identify the node correctly
    before you can split the line).
      - If there's a `tag:`, it should go first.
      - If there's a `name:`, it should go next (followed by the
        `linkageName:`, if any).
      - If there's a `scope:`, it should follow after that.
  - When a node type supports multiple DW_TAGs, but one is implied by
    its name and is overwhelmingly more common, the `tag:` field is
    terribly uninteresting unless it's different.
      - `MDBasicType` is almost always `DW_TAG_base_type`.
      - `MDTemplateValueParameter` is almost always
        `DW_TAG_template_value_parameter`.
  - Printing `name: ""` doesn't improve CHECK-ability, and there are far
    more nodes than I realized that are commonly nameless.
  - There are a few other fields that similarly aren't very interesting
    when they're empty.

This commit updates the `AsmWriter` as suggested above (and makes
necessary changes in `LLParser` for round-tripping).

llvm-svn: 230877
2015-02-28 23:21:38 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LLLexer.cpp AsmParser/Writer: Handle symbolic constants in DI 'flags:' 2015-02-21 01:02:18 +00:00
LLLexer.h AsmParser: Don't crash if a null byte is inside a quoted string 2014-12-10 00:43:17 +00:00
LLParser.cpp Optimize metadata node fields for CHECK-ability 2015-02-28 23:21:38 +00:00
LLParser.h AsmWriter/Bitcode: MDSubprogram 2015-02-13 01:26:47 +00:00
LLToken.h AsmParser/Writer: Handle symbolic constants in DI 'flags:' 2015-02-21 01:02:18 +00:00
LLVMBuild.txt
Makefile
module.modulemap
Parser.cpp Remove std::move that was preventing return value optimization. 2015-01-17 00:46:44 +00:00