diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-17 21:42:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-17 21:42:44 +0000 |
commit | 257c5f2088d60f110e4aec3bcf6522c5a90e867b (patch) | |
tree | 9bc355f2f476e2e0a1f89a3e71ecd1aa915de575 /llvm/lib/Transforms/Utils/SSAUpdater.cpp | |
parent | fb21e842487fb3298a45f29836ebde7ed73ed31d (diff) | |
download | bcm5719-llvm-257c5f2088d60f110e4aec3bcf6522c5a90e867b.tar.gz bcm5719-llvm-257c5f2088d60f110e4aec3bcf6522c5a90e867b.zip |
Fix undefined behavior (binding a reference to a dereferenced null pointer) if
SSAUpdater was created and destroyed without being initialized.
llvm-svn: 162137
Diffstat (limited to 'llvm/lib/Transforms/Utils/SSAUpdater.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SSAUpdater.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SSAUpdater.cpp b/llvm/lib/Transforms/Utils/SSAUpdater.cpp index e568a616b6f..72d4199a2a6 100644 --- a/llvm/lib/Transforms/Utils/SSAUpdater.cpp +++ b/llvm/lib/Transforms/Utils/SSAUpdater.cpp @@ -39,7 +39,7 @@ SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode*> *NewPHI) : AV(0), ProtoType(0), ProtoName(), InsertedPHIs(NewPHI) {} SSAUpdater::~SSAUpdater() { - delete &getAvailableVals(AV); + delete static_cast<AvailableValsTy*>(AV); } /// Initialize - Reset this object to get ready for a new set of SSA |