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

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310318: This adds the argument --dump-ir to clang-import-test, which allows (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D36429?vs=110095=110104#toc Repository: rL LLVM

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

2017-08-07 Thread Lang Hames via Phabricator via cfe-commits
lhames accepted this revision. lhames added a comment. This revision is now accepted and ready to land. LGTM! Comment at: tools/clang-import-test/clang-import-test.cpp:301-303 + if (ShouldDumpIR) { +CG.GetModule()->print(llvm::outs(), nullptr); + } LLVM

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

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110095. spyffe added a comment. Eliminate sensitive dependence on `sizeof(int)`. `bool` should still be rendered as `i1` though. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp

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

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110093. spyffe added a comment. Added a passing test for a global struct, so we have something that'll fail if the IR dumping breaks. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp

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

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
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