DebugInfo: Remove a few unnecessary wrappers
[oota-llvm.git] / include / llvm / IR / DebugInfo.h
index 32cea6f34879ffb34938be636a3e4d072d0bfc1a..b2685da6573792d13cd318aab5a3c26860dbb444 100644 (file)
@@ -513,26 +513,19 @@ public:
   unsigned getScopeLineNumber() const { return get()->getScopeLine(); }
 
   DIScopeRef getContext() const { return get()->getScope(); }
-  DISubroutineType getType() const {
-    return DISubroutineType(get()->getType());
-  }
+  DISubroutineType getType() const { return get()->getType(); }
 
   DITypeRef getContainingType() const { return get()->getContainingType(); }
 
   /// \brief Check if this provides debugging information for the function F.
-  bool describes(const Function *F);
+  bool describes(const Function *F) const { return get()->describes(F); }
 
   Function *getFunction() const { return get()->getFunction(); }
 
-  void replaceFunction(Function *F) {
-    if (auto *N = get())
-      N->replaceFunction(F);
-  }
-  DIArray getTemplateParams() const {
-    return DIArray(get()->getTemplateParams());
-  }
+  void replaceFunction(Function *F) { get()->replaceFunction(F); }
+  DIArray getTemplateParams() const { return get()->getTemplateParams(); }
   DISubprogram getFunctionDeclaration() const {
-    return DISubprogram(get()->getDeclaration());
+    return get()->getDeclaration();
   }
   DIArray getVariables() const { return DIArray(get()->getVariables()); }