DI: Reverse direction of subprogram -> function edge.
[oota-llvm.git] / lib / CodeGen / LiveDebugVariables.cpp
index 6559d8df1a2d7254e248645cfc9679ec89f884ff..654328714bc59b8448bf17c0886cefc838a97334 100644 (file)
@@ -761,7 +761,7 @@ static void removeDebugValues(MachineFunction &mf) {
 bool LiveDebugVariables::runOnMachineFunction(MachineFunction &mf) {
   if (!EnableLDV)
     return false;
-  if (!FunctionDIs.count(mf.getFunction())) {
+  if (!mf.getFunction()->getSubprogram()) {
     removeDebugValues(mf);
     return false;
   }
@@ -1045,7 +1045,6 @@ void LiveDebugVariables::emitDebugValues(VirtRegMap *VRM) {
 }
 
 bool LiveDebugVariables::doInitialization(Module &M) {
-  FunctionDIs = makeSubprogramMap(M);
   return Pass::doInitialization(M);
 }