summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-09-18 22:08:57 +0000
committerAdrian Prantl <aprantl@apple.com>2013-09-18 22:08:57 +0000
commit0315f38a92fe55dcb5a6070d6b80a414f1791724 (patch)
treefbed7640fc1b991abc12e4902f6e0cecc50c0cd8 /clang/lib/CodeGen
parent5977d875c1cb8a57d494a6d11d342256e4a80e77 (diff)
downloadbcm5719-llvm-0315f38a92fe55dcb5a6070d6b80a414f1791724.tar.gz
bcm5719-llvm-0315f38a92fe55dcb5a6070d6b80a414f1791724.zip
Debug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.
This allows us to get rid of an ugly hack in the backend. Paired commit with LLVM. llvm-svn: 190960
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 0069d577f24..23b73a31f03 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2747,6 +2747,8 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
DBuilder.insertDeclare(Storage, D, Builder.GetInsertBlock());
Call->setDebugLoc(llvm::DebugLoc::get(Line, Column, Scope));
return;
+ } else if (isa<VariableArrayType>(VD->getType())) {
+ Flags |= llvm::DIDescriptor::FlagIndirectVariable;
}
} else if (const RecordType *RT = dyn_cast<RecordType>(VD->getType())) {
// If VD is an anonymous union then Storage represents value for
OpenPOWER on IntegriCloud