[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 10:53:53 PDT 2017
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CGExpr.cpp:76
auto DestAddrSpace = getContext().getTargetAddressSpace(LangAS::Default);
+ EnsureInsertPoint();
+ auto *CurBB = Builder.GetInsertBlock();
----------------
IRBuilder already has saveIP() and restoreIP() methods for this purpose that deal correctly with the current insertion point being null.
https://reviews.llvm.org/D35438
More information about the cfe-commits
mailing list