If compile unit's language is not set then don't crash while dump'ing compile unit.
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index 38dd4033fb93b6087a53ef8ed0564f4312bdc1d5..cf7f39140b8663e25daf837a8973b3001d2b7384 100644 (file)
@@ -397,7 +397,7 @@ unsigned MachineFunction::getOrCreateDebugLocID(unsigned Src, unsigned Line,
 }
 
 /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object.
-const DebugLocTuple &MachineFunction::getDebugLocTuple(DebugLoc DL) {
+DebugLocTuple MachineFunction::getDebugLocTuple(DebugLoc DL) const {
   unsigned Idx = DL.getIndex();
   assert(Idx < DebugLocInfo.DebugLocations.size() &&
          "Invalid index into debug locations!");