]> granicus.if.org Git - llvm/commit
[AliasAnalysis] Initialize a member variable that may be used by unit test.
authorPeter Smith <peter.smith@linaro.org>
Fri, 2 Aug 2019 08:05:14 +0000 (08:05 +0000)
committerPeter Smith <peter.smith@linaro.org>
Fri, 2 Aug 2019 08:05:14 +0000 (08:05 +0000)
commit6f9189d7b1826408f0408199e73f44261361cb8b
tree862ab08a23cadeabb51bcff71dfc1ef40ff657a5
parent4c6fbe982e580dff037a68d9d156a5677b3e7782
[AliasAnalysis] Initialize a member variable that may be used by unit test.

The unit tests in BasicAliasAnalysisTest use the alias analysis API
directly and do not call setAAResults to initalize AAR. This gives a
valgrind error "Conditional Jump depends on unitialized variable".

On most buildbots the variable is nullptr, but in some cases it can be
non nullptr leading to seemingly random failures.

These tests were disabled in r366986. With the initialization they can be
enabled again.

Fixes PR42719

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367662 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AliasAnalysis.h
unittests/Analysis/BasicAliasAnalysisTest.cpp