Fix uninitialized read of CalleeWithThisReturn.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 26 Mar 2013 13:44:29 +0000 (13:44 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 26 Mar 2013 13:44:29 +0000 (13:44 +0000)
commit2e7d6cd0ec898ac5ff205a2aed096e20ab315cad
tree9446479027dfbcfc4b77cb9bf8f0e146fa95f4cc
parent56a784d2f672411060364766ea9f7899066d8e35
Fix uninitialized read of CalleeWithThisReturn.

CalleeWithThisReturn can be left initialized if HasThisReturn() is false.
This change reverses the order of checks in EmitFunctionEpilog such that
CalleeWithThisReturn is only examined when it has a meaningful value.

Found with MemorySanitizer.

llvm-svn: 178015
clang/lib/CodeGen/CGCall.cpp