[Typo fix] RNG: Take pass name as argument instead of pass pointer.
authorDominic Chen <d.c.ddcc@gmail.com>
Fri, 31 Jan 2020 19:34:49 +0000 (14:34 -0500)
committerDominic Chen <d.c.ddcc@gmail.com>
Fri, 31 Jan 2020 19:40:45 +0000 (14:40 -0500)
Summary: With the new pass manager, it is not possible to obtain a pointer to the pass.

Reviewers: jfb, rinon, yln

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

llvm/unittests/IR/ModuleTest.cpp

index 15180bc..f642b00 100644 (file)
@@ -63,7 +63,7 @@ TEST(ModuleTest, randomNumberGenerator) {
 
   std::array<int, NBCheck> RandomStreams[2];
   for (auto &RandomStream : RandomStreams) {
-    std::unique_ptr<RandomNumberGenerator> RNG = M.createRNG(DP->getPassName());
+    std::unique_ptr<RandomNumberGenerator> RNG = M.createRNG(DP.getPassName());
     std::generate(RandomStream.begin(), RandomStream.end(),
                   [&]() { return dist(*RNG); });
   }