summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/ModuleTest.cpp
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@quarkslab.com>2017-07-12 08:03:44 +0000
committerSerge Guelton <sguelton@quarkslab.com>2017-07-12 08:03:44 +0000
commite14625faa66e23da866e065b527d4e766a2f449d (patch)
tree449083ea10ceab81ad178971307e34705206a06d /llvm/unittests/IR/ModuleTest.cpp
parentfce5c67920a9bc4ca74067f280497d77ada26e2c (diff)
downloadbcm5719-llvm-e14625faa66e23da866e065b527d4e766a2f449d.tar.gz
bcm5719-llvm-e14625faa66e23da866e065b527d4e766a2f449d.zip
Have Module::createRNG return a unique_ptr
Instead of a raw pointer, this makes memory management safer. llvm-svn: 307762
Diffstat (limited to 'llvm/unittests/IR/ModuleTest.cpp')
-rw-r--r--llvm/unittests/IR/ModuleTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/IR/ModuleTest.cpp b/llvm/unittests/IR/ModuleTest.cpp
index d93d036bb11..af55a098add 100644
--- a/llvm/unittests/IR/ModuleTest.cpp
+++ b/llvm/unittests/IR/ModuleTest.cpp
@@ -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)};
+ std::unique_ptr<RandomNumberGenerator> RNG = M.createRNG(&DP);
std::generate(RandomStream.begin(), RandomStream.end(),
[&]() { return dist(*RNG); });
}
OpenPOWER on IntegriCloud