summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2019-11-18 14:16:08 -0800
committerVedant Kumar <vsk@apple.com>2019-11-18 15:07:59 -0800
commitea1db31d20a74e5025a86b0df49163d5bfecb67b (patch)
treedd1a5612d6d8a1ccdc69e43b44dd2ebe66c535f8 /clang/lib/CodeGen
parente84468c1f145e9a5e54640ebdc78bc40c7da3fce (diff)
downloadbcm5719-llvm-ea1db31d20a74e5025a86b0df49163d5bfecb67b.tar.gz
bcm5719-llvm-ea1db31d20a74e5025a86b0df49163d5bfecb67b.zip
[CodeGen] Assign locations to calls to special struct helpers
Assign artificial locations to calls to special struct-related helper functions. Such calls may not inherit a location if emitted within FinishFunction, at which point the lexical scope stack may be empty, causing CGDebugInfo to report the current DebugLoc as empty. Fixes an IR verifier complaint about a call to '__destructor_8_s0' not having a !dbg location attached. rdar://57293361
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGNonTrivialStruct.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGNonTrivialStruct.cpp b/clang/lib/CodeGen/CGNonTrivialStruct.cpp
index 05615aa1288..332e51e57de 100644
--- a/clang/lib/CodeGen/CGNonTrivialStruct.cpp
+++ b/clang/lib/CodeGen/CGNonTrivialStruct.cpp
@@ -817,6 +817,7 @@ template <class G, size_t N>
static void callSpecialFunction(G &&Gen, StringRef FuncName, QualType QT,
bool IsVolatile, CodeGenFunction &CGF,
std::array<Address, N> Addrs) {
+ auto SetArtificialLoc = ApplyDebugLocation::CreateArtificial(CGF);
for (unsigned I = 0; I < N; ++I)
Addrs[I] = CGF.Builder.CreateBitCast(Addrs[I], CGF.CGM.Int8PtrPtrTy);
QT = IsVolatile ? QT.withVolatile() : QT;
OpenPOWER on IntegriCloud