diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-09-21 16:00:03 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-09-21 16:00:03 +0000 |
commit | 28b4afc10396abaffea9035cfb752f9858f04846 (patch) | |
tree | 17590069798cc17f9cd5d3fa438192473c3a3c64 /lib/Analysis/DebugInfo.cpp | |
parent | f16580665589584d3249d8a3c4dd4ea90dfb9e47 (diff) | |
download | external_llvm-28b4afc10396abaffea9035cfb752f9858f04846.zip external_llvm-28b4afc10396abaffea9035cfb752f9858f04846.tar.gz external_llvm-28b4afc10396abaffea9035cfb752f9858f04846.tar.bz2 |
Make CreateComplexVariable independent of SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 5ca89c6..53189b8 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -1181,21 +1181,20 @@ DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context, /// CreateComplexVariable - Create a new descriptor for the specified variable /// which has a complex address expression for its address. DIVariable DIFactory::CreateComplexVariable(unsigned Tag, DIDescriptor Context, - const std::string &Name, - DIFile F, + StringRef Name, DIFile F, unsigned LineNo, - DIType Ty, - SmallVector<Value *, 9> &addr) { - SmallVector<Value *, 9> Elts; + DIType Ty, Value *const *Addr, + unsigned NumAddr) { + SmallVector<Value *, 15> Elts; Elts.push_back(GetTagConstant(Tag)); Elts.push_back(Context); Elts.push_back(MDString::get(VMContext, Name)); Elts.push_back(F); Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), LineNo)); Elts.push_back(Ty); - Elts.insert(Elts.end(), addr.begin(), addr.end()); + Elts.append(Addr, Addr+NumAddr); - return DIVariable(MDNode::get(VMContext, &Elts[0], 6+addr.size())); + return DIVariable(MDNode::get(VMContext, Elts.data(), Elts.size())); } |