Skip to content

Commit

Permalink
[bpf] fix build
Browse files Browse the repository at this point in the history
fix the build and remove unused variable warnings in Release mode.

Patch by Brenden Blanco.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234349 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
4ast committed Apr 7, 2015
1 parent 1106660 commit 68e6b65
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/Target/BPF/BPFISelLowering.cpp
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ class DiagnosticInfoUnsupported : public DiagnosticInfo {
raw_string_ostream OS(Str);

if (DLoc) {
DILocation DIL(DLoc.getAsMDNode());
DILocation DIL(DLoc.get());
StringRef Filename = DIL.getFilename();
unsigned Line = DIL.getLineNumber();
unsigned Column = DIL.getColumnNumber();
@@ -537,12 +537,10 @@ SDValue BPFTargetLowering::LowerGlobalAddress(SDValue Op,
MachineBasicBlock *
BPFTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
MachineBasicBlock *BB) const {
unsigned Opc = MI->getOpcode();

const TargetInstrInfo &TII = *BB->getParent()->getSubtarget().getInstrInfo();
DebugLoc DL = MI->getDebugLoc();

assert(Opc == BPF::Select && "Unexpected instr type to insert");
assert(MI->getOpcode() == BPF::Select && "Unexpected instr type to insert");

// To "insert" a SELECT instruction, we actually have to insert the diamond
// control-flow pattern. The incoming instruction knows the destination vreg
3 changes: 1 addition & 2 deletions lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp
Original file line number Diff line number Diff line change
@@ -76,9 +76,8 @@ unsigned BPFMCCodeEmitter::getMachineOpValue(const MCInst &MI,
assert(MO.isExpr());

const MCExpr *Expr = MO.getExpr();
MCExpr::ExprKind Kind = Expr->getKind();

assert(Kind == MCExpr::SymbolRef);
assert(Expr->getKind() == MCExpr::SymbolRef);

if (MI.getOpcode() == BPF::JAL)
// func call name

0 comments on commit 68e6b65

Please sign in to comment.