diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-02-10 23:18:28 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-02-10 23:18:28 +0000 |
commit | ca7e4702211a8cd6c65785089f6f782901323a0b (patch) | |
tree | 9695c25b0aceb425434ab140798e565fcfeb5cb3 /llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | |
parent | d49691f77989cf74c29e4c7b7217b52ed5beac94 (diff) | |
download | bcm5719-llvm-ca7e4702211a8cd6c65785089f6f782901323a0b.tar.gz bcm5719-llvm-ca7e4702211a8cd6c65785089f6f782901323a0b.zip |
Debug Info: Support variables that are described by more than one MMI
table entry. This happens when SROA splits up an alloca and the resulting
allocas cannot be lowered to SSA values because their address is passed
to a function.
Fixes PR22502.
llvm-svn: 228764
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index 408f683301d..3988f0def31 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -146,7 +146,7 @@ void DwarfFile::emitStrings(const MCSection *StrSection, StrPool.emit(*Asm, StrSection, OffsetSection); } -void DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { +bool DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS]; DIVariable DV = Var->getVariable(); // Variables with positive arg numbers are parameters. @@ -168,13 +168,17 @@ void DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { // A later indexed parameter has been found, insert immediately before it. if (CurNum > ArgNum) break; - assert(CurNum != ArgNum && "Duplicate argument"); + if (CurNum == ArgNum) { + (*I)->addMMIEntry(*Var); + return false; + } ++I; } Vars.insert(I, Var); - return; + return true; } Vars.push_back(Var); + return true; } } |