Fix undefined behavior that is caused by not always initializing a bool.

The fix in r310994 is incomplete, as moveFromAndCancel can set the
pointer without initializing OldIsSpeculativelyEvaluating.

llvm-svn: 311070
This commit is contained in:
Daniel Jasper 2017-08-17 06:33:46 +00:00
parent caff3268a1
commit a7e061f07b
1 changed files with 1 additions and 0 deletions

View File

@ -984,6 +984,7 @@ namespace {
void moveFromAndCancel(SpeculativeEvaluationRAII &&Other) {
Info = Other.Info;
OldStatus = Other.OldStatus;
OldIsSpeculativelyEvaluating = Other.OldIsSpeculativelyEvaluating;
Other.Info = nullptr;
}