[llvm] r234349 - [bpf] fix build

Alexei Starovoitov alexei.starovoitov at gmail.com
Tue Apr 7 13:25:34 PDT 2015


Author: ast
Date: Tue Apr  7 15:25:34 2015
New Revision: 234349

URL: http://llvm.org/viewvc/llvm-project?rev=234349&view=rev
Log:
[bpf] fix build

fix the build and remove unused variable warnings in Release mode.

Patch by Brenden Blanco.

Modified:
    llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
    llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=234349&r1=234348&r2=234349&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Tue Apr  7 15:25:34 2015
@@ -64,7 +64,7 @@ public:
     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::LowerGlobalAd
 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

Modified: llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp?rev=234349&r1=234348&r2=234349&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp Tue Apr  7 15:25:34 2015
@@ -76,9 +76,8 @@ unsigned BPFMCCodeEmitter::getMachineOpV
   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





More information about the llvm-commits mailing list