[llvm] r318724 - Add default values for member functions.
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 17:45:17 PST 2017
Author: rtrieu
Date: Mon Nov 20 17:45:17 2017
New Revision: 318724
URL: http://llvm.org/viewvc/llvm-project?rev=318724&view=rev
Log:
Add default values for member functions.
Initialize IsVis2 and IsVis3 in SparcSubtarget::initializeSubtargetDependencies.
MSan detected uninitialized read of IsVis3 after r318704. Initializing the
variables to false will prevent undefined behavior.
Modified:
llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp
Modified: llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp?rev=318724&r1=318723&r2=318724&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp Mon Nov 20 17:45:17 2017
@@ -33,6 +33,8 @@ SparcSubtarget &SparcSubtarget::initiali
IsLeon = false;
V8DeprecatedInsts = false;
IsVIS = false;
+ IsVIS2 = false;
+ IsVIS3 = false;
HasHardQuad = false;
UsePopc = false;
UseSoftFloat = false;
More information about the llvm-commits
mailing list