summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-12-10 01:16:09 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-12-10 01:16:09 +0000
commitd85548d423409e11204f60b5d76f61a779d41b09 (patch)
treec5001d3d5bdc560f7cec44ba329c9966601526e9 /clang/lib
parent96d7732b08dfb61e9c15ee6f0dd0550aeae1fcfc (diff)
downloadbcm5719-llvm-d85548d423409e11204f60b5d76f61a779d41b09.tar.gz
bcm5719-llvm-d85548d423409e11204f60b5d76f61a779d41b09.zip
DebugInfo: Fix another case of array access line information
llvm-svn: 223897
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index e7caf835ce2..ca06e852d0f 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -2452,6 +2452,9 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E,
// Propagate the alignment from the array itself to the result.
ArrayAlignment = ArrayLV.getAlignment();
+ if (auto *DI = getDebugInfo())
+ DI->EmitLocation(Builder, E->getLocStart());
+
if (getLangOpts().isSignedOverflowDefined())
Address = Builder.CreateGEP(ArrayPtr, Args, "arrayidx");
else
OpenPOWER on IntegriCloud