DebugInfo: Assume valid pointer in DISubprogram::replaceFunction()
[oota-llvm.git] / include / llvm / IR / DebugInfo.h
index f4f6bd3ecde561a48135218c8ae4ade5fd9164ef..69eacc7b8b1a5cd6296265fcc6e3fbdfb76ba674 100644 (file)
@@ -524,10 +524,7 @@ public:
 
   Function *getFunction() const { return get()->getFunction(); }
 
-  void replaceFunction(Function *F) {
-    if (auto *N = get())
-      N->replaceFunction(F);
-  }
+  void replaceFunction(Function *F) { get()->replaceFunction(F); }
   DIArray getTemplateParams() const {
     return DIArray(get()->getTemplateParams());
   }