From 73ca56942dc55c29c4dfa4a7ce64e466fe43c891 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 9 Dec 2014 00:32:22 +0000 Subject: DebugInfo: Correctly identify the location of C++ member initializer list elements This particularly helps the fidelity of ASan reports (which can occur even in these examples - if, for example, one uses placement new over a buffer of insufficient size - now ASan will correctly identify which member's initialization went over the end of the buffer). This doesn't cover all types of members - more coming. llvm-svn: 223726 --- clang/lib/CodeGen/CGExpr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExpr.cpp') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 6ced6e18f94..0ce09c8a30f 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1437,7 +1437,11 @@ RValue CodeGenFunction::EmitLoadOfGlobalRegLValue(LValue LV) { /// lvalue, where both are guaranteed to the have the same type, and that type /// is 'Ty'. void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst, - bool isInit) { + bool isInit, + SourceLocation DbgLoc) { + if (auto *DI = getDebugInfo()) + DI->EmitLocation(Builder, DbgLoc); + if (!Dst.isSimple()) { if (Dst.isVectorElt()) { // Read/modify/write the vector, inserting the new element. -- cgit v1.2.3