Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes...
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 21 Aug 2014 22:45:21 +0000 (22:45 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 21 Aug 2014 22:45:21 +0000 (22:45 +0000)
commitc7260209a8cf404c461483da8dee33fad84bbf18
tree40ac60c0e4ba9048cd26157d9234e80c1d649d4b
parentd1a09c47d2460a8fda09affc413c64c2eb489629
Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks.

Somewhat unnoticed in the original implementation of discriminators, but
it could cause instructions to end up in new, small,
DW_TAG_lexical_blocks due to the use of DILexicalBlock to track
discriminator changes.

Instead, use DILexicalBlockFile which we already use to track file
changes without introducing new scopes, so it works well to track
discriminator changes in the same way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216239 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
docs/SourceLevelDebugging.rst
include/llvm/IR/DIBuilder.h
include/llvm/IR/DebugInfo.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/IR/DIBuilder.cpp
lib/IR/DebugInfo.cpp
lib/Transforms/Utils/AddDiscriminators.cpp
test/DebugInfo/COFF/multifile.ll
test/DebugInfo/X86/discriminator.ll
test/DebugInfo/inline-scopes.ll
test/Transforms/AddDiscriminators/basic.ll
test/Transforms/AddDiscriminators/first-only.ll
test/Transforms/AddDiscriminators/multiple.ll
test/Transforms/AddDiscriminators/no-discriminators.ll
test/Transforms/SampleProfile/calls.ll
test/Transforms/SampleProfile/discriminator.ll