Delete unused argument in AArch64MCInstLower constructor: it doesn't

use Mangler, and Mangler is in fact not even created when AArch64MCInstLower
is constructed.

This bug is reported by UBSan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov 2014-08-19 21:51:08 +00:00
parent 5a466d37d8
commit 97eadf21c8
3 changed files with 3 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public:
AArch64AsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
: AsmPrinter(TM, Streamer),
Subtarget(&TM.getSubtarget<AArch64Subtarget>()),
MCInstLowering(OutContext, *Mang, *this), SM(*this), AArch64FI(nullptr),
MCInstLowering(OutContext, *this), SM(*this), AArch64FI(nullptr),
LOHLabelCounter(0) {}
const char *getPassName() const override {

View File

@ -25,8 +25,7 @@
#include "llvm/Target/TargetMachine.h"
using namespace llvm;
AArch64MCInstLower::AArch64MCInstLower(MCContext &ctx, Mangler &mang,
AsmPrinter &printer)
AArch64MCInstLower::AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer)
: Ctx(ctx), Printer(printer), TargetTriple(printer.getTargetTriple()) {}
MCSymbol *

View File

@ -33,7 +33,7 @@ class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower {
Triple TargetTriple;
public:
AArch64MCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer);
AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer);
bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const;
void Lower(const MachineInstr *MI, MCInst &OutMI) const;