[PATCH] D14181: Update the discriminator assignment algorithm.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 14:40:15 PDT 2015
danielcdh added inline comments.
================
Comment at: lib/Transforms/Utils/AddDiscriminators.cpp:223
@@ +222,3 @@
+ << CurrentDIL->getColumn() << ":"
+ << NewDIL->getDiscriminator() << *I1 << "\n");
+ }
----------------
Updated NewDIL to CurrentDIL and removed NewDIL.
Updated the testcase to include the original source code.
Without the patch, we will have:
!23 = !DILocation(line: 2, column: 17, scope: !24)
!24 = !DILexicalBlockFile(scope: !20, file: !1, discriminator: 2)
!25 = !DILocation(line: 2, column: 19, scope: !20)
!26 = !DILocation(line: 2, column: 7, scope: !4)
Note that #25 and #26 do not have discriminator 2
And we also see nested discriminator, which is a waste of space.
!27 = !DILocation(line: 2, column: 25, scope: !28)
!28 = !DILexicalBlockFile(scope: !29, file: !1, discriminator: 3)
!29 = !DILexicalBlockFile(scope: !20, file: !1, discriminator: 1)
http://reviews.llvm.org/D14181
More information about the llvm-commits
mailing list