summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-12-09 00:32:22 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-12-09 00:32:22 +0000
commit73ca56942dc55c29c4dfa4a7ce64e466fe43c891 (patch)
treeb4f5873b49923490ad235a0d42afd7a07097d9ef /clang/lib/CodeGen/CGExpr.cpp
parent0dd4dd3adba6576ccf49839a840e6c9d115dd553 (diff)
downloadbcm5719-llvm-73ca56942dc55c29c4dfa4a7ce64e466fe43c891.tar.gz
bcm5719-llvm-73ca56942dc55c29c4dfa4a7ce64e466fe43c891.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp6
1 files changed, 5 insertions, 1 deletions
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.
OpenPOWER on IntegriCloud