This adds the argument --dump-ir to clang-import-test, which allows
authorSean Callanan <scallanan@apple.com>
Mon, 7 Aug 2017 22:27:30 +0000 (22:27 +0000)
committerSean Callanan <scallanan@apple.com>
Mon, 7 Aug 2017 22:27:30 +0000 (22:27 +0000)
commit2b3a54bafc38fd096986e401eedd49b88c9cf576
tree45031a0815220008d961187136fb86a50cdd27f2
parent8c1167df5c2d6aba3298489956fc4c4dc4de3793
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 two tests:

- A test that checks that structs in top-level code are completed
  correctly during struct layout (they are)
- A test that checks that structs defined in function bodies are
  cpmpleted correctly during struct layout (currently they are not,
  so this is XFAIL).

The second test fails because LookupSameContext()
(ExternalASTMerger.cpp) can't find the struct. This is an issue I
intend to resolve separately.

Differential Revision: https://reviews.llvm.org/D36429

llvm-svn: 310318
clang/test/Import/local-struct/Inputs/Callee.cpp [new file with mode: 0644]
clang/test/Import/local-struct/test.cpp [new file with mode: 0644]
clang/test/Import/struct-layout/Inputs/Callee.cpp [new file with mode: 0644]
clang/test/Import/struct-layout/test.cpp [new file with mode: 0644]
clang/tools/clang-import-test/clang-import-test.cpp