summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-16 19:44:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-16 19:44:13 +0000
commitd004918ccb96657f20af6b259cb844c91f6614e2 (patch)
tree322a5a3bd97955a6b3587e35928cce1cb3d2ef71 /clang/lib/CodeGen/CodeGenFunction.h
parent27bacafb713bff12f84e47dcec5e4eaea8f42ddd (diff)
downloadbcm5719-llvm-d004918ccb96657f20af6b259cb844c91f6614e2.tar.gz
bcm5719-llvm-d004918ccb96657f20af6b259cb844c91f6614e2.zip
IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name.
llvm-svn: 96374
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index fb2e5fee730..a4db556d397 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -663,6 +663,13 @@ public:
llvm::AllocaInst *CreateTempAlloca(const llvm::Type *Ty,
const llvm::Twine &Name = "tmp");
+ /// CreateIRTemp - Create a temporary IR object of the given type, with
+ /// appropriate alignment. This routine should only be used when an temporary
+ /// value needs to be stored into an alloca (for example, to avoid explicit
+ /// PHI construction), but the type is the IR type, not the type appropriate
+ /// for storing in memory.
+ llvm::Value *CreateIRTemp(QualType T, const llvm::Twine &Name = "tmp");
+
/// CreateMemTemp - Create a temporary memory object of the given type, with
/// appropriate alignment.
llvm::Value *CreateMemTemp(QualType T, const llvm::Twine &Name = "tmp");
OpenPOWER on IntegriCloud