diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-26 18:24:39 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-26 18:24:39 +0000 |
commit | 7b5bd3724193b3a48e342301c1644a01a9e72f31 (patch) | |
tree | 4ffcee96f4189b7afce30c97fe485451c3f850b6 /lib/Analysis | |
parent | 9750acc079409e52f6563636a112a9de50749b30 (diff) | |
download | external_llvm-7b5bd3724193b3a48e342301c1644a01a9e72f31.zip external_llvm-7b5bd3724193b3a48e342301c1644a01a9e72f31.tar.gz external_llvm-7b5bd3724193b3a48e342301c1644a01a9e72f31.tar.bz2 |
Fix an off by one error while accessing complex address element of a DIVariable.
This worked untill now because stars are aligned (i.e. num of complex address elments are always 0 or 2+ and when it is 2+ at least two elements are access together)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DIBuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp index 80d6152..dc98c9e 100644 --- a/lib/Analysis/DIBuilder.cpp +++ b/lib/Analysis/DIBuilder.cpp @@ -656,6 +656,7 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope, Elts.push_back(F); Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24)))); Elts.push_back(Ty); + Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext))); Elts.append(Addr.begin(), Addr.end()); return DIVariable(MDNode::get(VMContext, Elts)); |