Get rid of the Pass+Context magic.

llvm-svn: 76702
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index 23adaed..4923842 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -115,10 +115,8 @@
 // Helper Methods in Function
 //===----------------------------------------------------------------------===//
 
-LLVMContext *Function::getContext() const {
-  const Module* M = getParent();
-  if (M) return &M->getContext();
-  return 0;
+LLVMContext &Function::getContext() const {
+  return getType()->getContext();
 }
 
 const FunctionType *Function::getFunctionType() const {