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 | 1cec7a05ee41725ec97b41608fe16d58c8c5b103 (patch) | |
tree | 340af8d9ba7ce7d2135fe06f183ac94757dd7147 /lib/Transforms | |
parent | 3028d38f6e55ae3808f97f7b5b0d7686f6483bdb (diff) | |
download | external_llvm-1cec7a05ee41725ec97b41608fe16d58c8c5b103.zip external_llvm-1cec7a05ee41725ec97b41608fe16d58c8c5b103.tar.gz external_llvm-1cec7a05ee41725ec97b41608fe16d58c8c5b103.tar.bz2 |
Fix undefined behavior (binding a reference to a dereferenced null pointer) if
SSAUpdater was created and destroyed without being initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/SSAUpdater.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SSAUpdater.cpp b/lib/Transforms/Utils/SSAUpdater.cpp index e568a61..72d4199 100644 --- a/lib/Transforms/Utils/SSAUpdater.cpp +++ b/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 |