When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.

llvm-svn: 165513
diff --git a/clang/test/Modules/Inputs/redecl-merge-left.h b/clang/test/Modules/Inputs/redecl-merge-left.h
index ee794ff..5e6d2e5 100644
--- a/clang/test/Modules/Inputs/redecl-merge-left.h
+++ b/clang/test/Modules/Inputs/redecl-merge-left.h
@@ -60,7 +60,7 @@
 typedef float T2;
 
 int func0(int);
-int func1(int);
+int func1(int x) { return x; }
 int func2(int);
 
 
diff --git a/clang/test/Modules/Inputs/redecl-merge-right.h b/clang/test/Modules/Inputs/redecl-merge-right.h
index f62020f..2022308 100644
--- a/clang/test/Modules/Inputs/redecl-merge-right.h
+++ b/clang/test/Modules/Inputs/redecl-merge-right.h
@@ -65,7 +65,7 @@
 int func0(int);
 int func1(int);
 int func1(int);
-int func1(int);
+int func1(int x) { return x; }
 int func1(int);
 static int func2(int);
 
diff --git a/clang/test/Modules/Inputs/redecl-merge-top.h b/clang/test/Modules/Inputs/redecl-merge-top.h
index 25456de..690e6df 100644
--- a/clang/test/Modules/Inputs/redecl-merge-top.h
+++ b/clang/test/Modules/Inputs/redecl-merge-top.h
@@ -14,3 +14,5 @@
 struct S1;
 struct S2;
 struct S2;
+
+int func1(int);