[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

Sean Callanan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 14:36:51 PDT 2017


spyffe created this revision.

This adds the argument `--dump-ir` to `clang-import-test`, which allows viewing of the final IR.   This is useful for confirming that structure layout was correct.

I've added an XFAILed test that exercises this, checking that a struct defined inside a function body has the right fields.  Currently it does not because `LookupSameContext()` (ExternalASTMerger.cpp) can't find the struct.  This is an issue I intend to resolve separately.


Repository:
  rL LLVM

https://reviews.llvm.org/D36429

Files:
  test/Import/local-struct/Inputs/Callee.cpp
  test/Import/local-struct/test.cpp
  tools/clang-import-test/clang-import-test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36429.110090.patch
Type: text/x-patch
Size: 3661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170807/29c61434/attachment.bin>


More information about the cfe-commits mailing list