[PATCH] D47858: [New PM] Introducing PassInstrumentation framework

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 13:33:15 PDT 2018


fedor.sergeev added inline comments.


================
Comment at: unittests/IR/PassBuilderCallbacksTest.cpp:463-464
+
+  {
+    testing::InSequence InstrumentationExpectationsSequenced;
+    EXPECT_CALL(PICallbacks, runBeforePass(HasNameRegex("MockPassHandle"),
----------------
fedor.sergeev wrote:
> chandlerc wrote:
> > I find it simpler to define a `Sequence` object and then connect it to each expectation with the `.InSequence` methods. This makes it fairly easy to avoid a proliferation of scopes to wire these things up. 
> > 
> > You'll also want to say how *many* calls here, which will make more sense once you make the change I suggest above w.r.t. the number.
> Ok, will try the sequence thing.
> And about how many calls - I thought EXPECT_CALL by default means Times(1)?
Did the sequencing change, still leaving EXPECT_CALL w/o Times(1) for brevity.


Repository:
  rL LLVM

https://reviews.llvm.org/D47858





More information about the llvm-commits mailing list