[bpf] fix build and remove a compiler warning in Release mode

Patch by Brenden Blanco.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexei Starovoitov 2015-04-26 01:58:08 +00:00
parent 77420c98f3
commit ad82d26669
2 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,7 @@ void BPFAsmPrinter::EmitInstruction(const MachineInstr *MI) {
MCInst TmpInst;
MCInstLowering.Lower(MI, TmpInst);
EmitToStreamer(OutStreamer, TmpInst);
EmitToStreamer(*OutStreamer, TmpInst);
}
// Force static initialization.

View File

@ -33,6 +33,7 @@ void BPFInstPrinter::printInst(const MCInst *MI, raw_ostream &O,
}
static void printExpr(const MCExpr *Expr, raw_ostream &O) {
#ifndef NDEBUG
const MCSymbolRefExpr *SRE;
if (const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr))
@ -44,6 +45,7 @@ static void printExpr(const MCExpr *Expr, raw_ostream &O) {
MCSymbolRefExpr::VariantKind Kind = SRE->getKind();
assert(Kind == MCSymbolRefExpr::VK_None);
#endif
O << *Expr;
}