Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 25d3d44..24dd3e5 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -653,6 +653,10 @@
   }
 }
 
+const FunctionDecl *FunctionDecl::getCanonicalDecl() const {
+  return getFirstDeclaration();
+}
+
 FunctionDecl *FunctionDecl::getCanonicalDecl() {
   return getFirstDeclaration();
 }