diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-01 11:25:10 +0000 |
---|---|---|
committer | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-01 11:25:10 +0000 |
commit | 17c4633e7faf76682e7c999576128848b10fb815 (patch) | |
tree | cef6c0668b787ede92f8ebf7e6d0c590136ae5c7 /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | e11f0545db7a0a6939befb31f5f2c43a8ba4874e (diff) | |
download | bcm5719-llvm-17c4633e7faf76682e7c999576128848b10fb815.tar.gz bcm5719-llvm-17c4633e7faf76682e7c999576128848b10fb815.zip |
[DebugInfo] Enable debug information for C99 VLA types
Summary:
This patch enables debugging of C99 VLA types by generating more precise
LLVM Debug metadata, using the extended DISubrange 'count' field that
takes a DIVariable.
This should implement:
Bug 30553: Debug info generated for arrays is not what GDB expects (not as good as GCC's)
https://bugs.llvm.org/show_bug.cgi?id=30553
Reviewers: echristo, aprantl, dexonsmith, clayborg, pcc, kristof.beyls, dblaikie
Reviewed By: aprantl
Subscribers: jholewinski, schweitz, davide, fhahn, JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D41698
llvm-svn: 323952
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index e85590bb429..1eae838ed99 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -5154,7 +5154,7 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *Size = CGF.Builder.CreateIntCast( CGF.getVLASize( CGF.getContext().getAsVariableArrayType((*IPriv)->getType())) - .first, + .NumElts, CGF.SizeTy, /*isSigned=*/false); CGF.Builder.CreateStore(CGF.Builder.CreateIntToPtr(Size, CGF.VoidPtrTy), Elem); |