[PATCH] D41433: Unit tests for TBAA metadata generation.

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 02:59:10 PST 2017


sepavloff created this revision.
sepavloff added reviewers: rjmccall, hfinkel.
Herald added subscribers: kosarev, mgorny.

Now tests for metadata created by clang involve compiling code snippets
placed into c/c++ source files and matching interesting patterns in the
obtained textual representation of IR. Writting such tests is a painful
process as metadata often form complex tree-like structures but textual
representation of IR contains only a pile of metadata at the module end.

This change implements IR matchers that may be used to match required
patterns in the binary IR representation. In this case the metadata
structure is not broken and creation of match patterns is easier.

The change adds unit tests for TBAA metadata generation.


Repository:
  rC Clang

https://reviews.llvm.org/D41433

Files:
  unittests/CodeGen/CMakeLists.txt
  unittests/CodeGen/IRMatchers.h
  unittests/CodeGen/TBAAMetadataTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41433.127675.patch
Type: text/x-patch
Size: 45624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171220/5c5b06c1/attachment-0001.bin>


More information about the cfe-commits mailing list