[llvm] r278442 - WholeProgramDevirt: fix access to a non-initialized field.

Ivan Krasin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 17:07:14 PDT 2016


Author: krasin
Date: Thu Aug 11 19:07:14 2016
New Revision: 278442

URL: http://llvm.org/viewvc/llvm-project?rev=278442&view=rev
Log:
WholeProgramDevirt: fix access to a non-initialized field.

Summary: This is a follow up to r278389, where I have introduced the bug

Reviewers: mehdi_amini

Differential Revision: https://reviews.llvm.org/D23436

Modified:
    llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.h

Modified: llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.h?rev=278442&r1=278441&r2=278442&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/WholeProgramDevirt.h Thu Aug 11 19:07:14 2016
@@ -118,7 +118,7 @@ struct VirtualCallTarget {
 
   // For testing only.
   VirtualCallTarget(const TypeMemberInfo *TM, bool IsBigEndian)
-      : Fn(nullptr), TM(TM), IsBigEndian(IsBigEndian) {}
+      : Fn(nullptr), TM(TM), IsBigEndian(IsBigEndian), WasDevirt(false) {}
 
   // The function stored in the vtable.
   Function *Fn;




More information about the llvm-commits mailing list