Don't pre-populate the set of keys in the map with variable locations history.
[opencl/llvm.git] / lib / CodeGen / AsmPrinter / DbgValueHistoryCalculator.cpp
index c9bf1ecf9075a87b415596e639acd410b89e6ac9..450d1541384914d731f01688b353fde1a342ae1e 100644 (file)
@@ -144,6 +144,7 @@ void calculateDbgValueHistory(const MachineFunction *MF,
         continue;
       }
 
+      assert(MI.getNumOperands() > 1 && "Invalid DBG_VALUE instruction!");
       const MDNode *Var = MI.getDebugVariable();
       auto &History = Result[Var];