diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
commit | 47db941fd3e5a698c4417e38686ff6da6b2d81ee (patch) | |
tree | f1bc8ce05f4b4c0c6f5eb775c3e5b12eda35e2f1 /llvm/lib/VMCore/Function.cpp | |
parent | 4565ef5b65b7d0b778b41836d70b806196cc8e24 (diff) | |
download | bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.tar.gz bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.zip |
Get rid of the Pass+Context magic.
llvm-svn: 76702
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 23adaed4a24..49238429640 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -115,10 +115,8 @@ void Argument::removeAttr(Attributes attr) { // 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 { |