mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Initialize the new AsmPrinterFlags field to 0, fixing uses of
uninitialized memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88985 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d1ba06bf13
commit
834651c945
@ -376,7 +376,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const MachineMemOperand &MMO) {
|
||||
/// MachineInstr ctor - This constructor creates a dummy MachineInstr with
|
||||
/// TID NULL and no operands.
|
||||
MachineInstr::MachineInstr()
|
||||
: TID(0), NumImplicitOps(0), MemRefs(0), MemRefsEnd(0),
|
||||
: TID(0), NumImplicitOps(0), AsmPrinterFlags(0), MemRefs(0), MemRefsEnd(0),
|
||||
Parent(0), debugLoc(DebugLoc::getUnknownLoc()) {
|
||||
// Make sure that we get added to a machine basicblock
|
||||
LeakDetector::addGarbageObject(this);
|
||||
@ -396,7 +396,8 @@ void MachineInstr::addImplicitDefUseOperands() {
|
||||
/// TargetInstrDesc or the numOperands if it is not zero. (for
|
||||
/// instructions with variable number of operands).
|
||||
MachineInstr::MachineInstr(const TargetInstrDesc &tid, bool NoImp)
|
||||
: TID(&tid), NumImplicitOps(0), MemRefs(0), MemRefsEnd(0), Parent(0),
|
||||
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0),
|
||||
debugLoc(DebugLoc::getUnknownLoc()) {
|
||||
if (!NoImp && TID->getImplicitDefs())
|
||||
for (const unsigned *ImpDefs = TID->getImplicitDefs(); *ImpDefs; ++ImpDefs)
|
||||
@ -414,7 +415,7 @@ MachineInstr::MachineInstr(const TargetInstrDesc &tid, bool NoImp)
|
||||
/// MachineInstr ctor - As above, but with a DebugLoc.
|
||||
MachineInstr::MachineInstr(const TargetInstrDesc &tid, const DebugLoc dl,
|
||||
bool NoImp)
|
||||
: TID(&tid), NumImplicitOps(0), MemRefs(0), MemRefsEnd(0),
|
||||
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0), MemRefs(0), MemRefsEnd(0),
|
||||
Parent(0), debugLoc(dl) {
|
||||
if (!NoImp && TID->getImplicitDefs())
|
||||
for (const unsigned *ImpDefs = TID->getImplicitDefs(); *ImpDefs; ++ImpDefs)
|
||||
@ -434,7 +435,8 @@ MachineInstr::MachineInstr(const TargetInstrDesc &tid, const DebugLoc dl,
|
||||
/// basic block.
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineBasicBlock *MBB, const TargetInstrDesc &tid)
|
||||
: TID(&tid), NumImplicitOps(0), MemRefs(0), MemRefsEnd(0), Parent(0),
|
||||
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0),
|
||||
debugLoc(DebugLoc::getUnknownLoc()) {
|
||||
assert(MBB && "Cannot use inserting ctor with null basic block!");
|
||||
if (TID->ImplicitDefs)
|
||||
@ -454,7 +456,7 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, const TargetInstrDesc &tid)
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineBasicBlock *MBB, const DebugLoc dl,
|
||||
const TargetInstrDesc &tid)
|
||||
: TID(&tid), NumImplicitOps(0), MemRefs(0), MemRefsEnd(0),
|
||||
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0), MemRefs(0), MemRefsEnd(0),
|
||||
Parent(0), debugLoc(dl) {
|
||||
assert(MBB && "Cannot use inserting ctor with null basic block!");
|
||||
if (TID->ImplicitDefs)
|
||||
@ -473,7 +475,7 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, const DebugLoc dl,
|
||||
/// MachineInstr ctor - Copies MachineInstr arg exactly
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI)
|
||||
: TID(&MI.getDesc()), NumImplicitOps(0),
|
||||
: TID(&MI.getDesc()), NumImplicitOps(0), AsmPrinterFlags(0),
|
||||
MemRefs(MI.MemRefs), MemRefsEnd(MI.MemRefsEnd),
|
||||
Parent(0), debugLoc(MI.getDebugLoc()) {
|
||||
Operands.reserve(MI.getNumOperands());
|
||||
|
Loading…
Reference in New Issue
Block a user