diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:09:07 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:09:07 +0000 | 
| commit | 571945e6affd20b19264ec22495da418d0fbdbb4 (patch) | |
| tree | 076117cdf3579003f07cad4cdf0593347ce58150 /lib/Transforms/Utils/SSAUpdater.cpp | |
| parent | 06f9d4012fb8acea3e9861d5722b5965dbb724d9 (diff) | |
Notes
Diffstat (limited to 'lib/Transforms/Utils/SSAUpdater.cpp')
| -rw-r--r-- | lib/Transforms/Utils/SSAUpdater.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SSAUpdater.cpp b/lib/Transforms/Utils/SSAUpdater.cpp index 8a07c35f352c7..ba41bf9d2e5c1 100644 --- a/lib/Transforms/Utils/SSAUpdater.cpp +++ b/lib/Transforms/Utils/SSAUpdater.cpp @@ -295,10 +295,14 @@ Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {        InsertedVal = SingularValue;      } +    // Either path through the 'if' should have set insertedVal -> SingularVal. +    assert((InsertedVal == SingularValue || isa<UndefValue>(InsertedVal)) && +           "RAUW didn't change InsertedVal to be SingularVal"); +      // Drop the entries we added in IncomingPredInfo to restore the stack.      IncomingPredInfo.erase(IncomingPredInfo.begin()+FirstPredInfoEntry,                             IncomingPredInfo.end()); -    return InsertedVal; +    return SingularValue;    }    // Otherwise, we do need a PHI: insert one now if we don't already have one.  | 
