[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 11:05:28 PDT 2017


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: lib/CodeGen/CGExpr.cpp:76
     auto DestAddrSpace = getContext().getTargetAddressSpace(LangAS::Default);
+    EnsureInsertPoint();
+    auto *CurBB = Builder.GetInsertBlock();
----------------
rjmccall wrote:
> IRBuilder already has saveIP() and restoreIP() methods for this purpose that deal correctly with the current insertion point being null.
Thanks. I will use those.


https://reviews.llvm.org/D35438





More information about the cfe-commits mailing list