diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-10-30 20:20:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-10-30 20:20:11 +0000 |
commit | 76fd43c6532f520f9587c35514290943b2b18b6e (patch) | |
tree | be965749fe884054456dc116fa808ba9a1476bd1 /llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | |
parent | 047d5d1a0ace660e524e42e416d6b99e29c0d340 (diff) | |
download | bcm5719-llvm-76fd43c6532f520f9587c35514290943b2b18b6e.tar.gz bcm5719-llvm-76fd43c6532f520f9587c35514290943b2b18b6e.zip |
PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site.
llvm-svn: 220923
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index 3d49db3db7e..c1c50df9ad3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -177,7 +177,12 @@ 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); + // FIXME: There are still some cases where two inlined functions are + // conflated together (two calls to the same function at the same + // location (eg: via a macro, or without column info, etc)) and then + // their arguments are conflated as well. + assert((LS->getParent() || CurNum != ArgNum) && + "Missing parameter for top level (non-inlined) function"); ++I; } Vars.insert(I, Var); |