summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-28 21:50:56 +0000
committerChris Lattner <sabre@nondot.org>2009-12-28 21:50:56 +0000
commit49f9f76030a2efaa9e487079bb800829093049a9 (patch)
treef3f533566bd4e1bd4c77fa0b0b37c94376d8bca6 /llvm/lib
parent7ef1cac57624d5d3a234e224328f919b37322ad3 (diff)
downloadbcm5719-llvm-49f9f76030a2efaa9e487079bb800829093049a9.tar.gz
bcm5719-llvm-49f9f76030a2efaa9e487079bb800829093049a9.zip
remove #include of Function.h from IRBuilder
llvm-svn: 92231
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/IRBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/IRBuilder.cpp b/llvm/lib/VMCore/IRBuilder.cpp
index 99803f134f5..0b4a10925a2 100644
--- a/llvm/lib/VMCore/IRBuilder.cpp
+++ b/llvm/lib/VMCore/IRBuilder.cpp
@@ -14,6 +14,7 @@
#include "llvm/Support/IRBuilder.h"
#include "llvm/GlobalVariable.h"
+#include "llvm/Function.h"
#include "llvm/Metadata.h"
#include "llvm/LLVMContext.h"
using namespace llvm;
@@ -44,3 +45,8 @@ void IRBuilderBase::SetInstDebugLocation(Instruction *I) const {
if (CurDbgLocation)
Context.getMetadata().addMD(DbgMDKind, CurDbgLocation, I);
}
+
+const Type *IRBuilderBase::getCurrentFunctionReturnType() const {
+ assert(BB && BB->getParent() && "No current function!");
+ return BB->getParent()->getReturnType();
+}
OpenPOWER on IntegriCloud