[PATCH] D23056: Adding test for DIMacro and DIMacroFile comparison implementation

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 11:51:24 PDT 2016


dblaikie added a comment.

Ah, thanks - OK, so the issue was that the second DICompileUnit ended up sharing the first's DIMacroFile. 
Does the test require both a top level DIMacro and a nested DIMacroFile+DIMacro? Or could a difference be observed with a smaller difference in just a DIMacro, etc?

So CHECK lines something like this would emphasize that:

  ; Verify that DICompileUnits don't share DIMacro info even though they are different
  ; CHECK: DICompileUnit
  ; CHECK-SAME: macros: [[MS1:![0-9]*]]
  ; CHECK: [[MS1]] = !{[[MF1:![0-9]*]]}
  ; CHECK: [[MF1]] = !DIMacroFile(
  ; CHECK-SAME: file: [[F1:![0-9]*]]
  ; CHECK: [[F1]] = !DIFile(filename: "x.h"
  ; CHECK: DICompileUnit
  ; CHECK-SAME: macros: [[MS2:![0-9]*]]
  ; CHECK: [[MS2]] = !{[[MF2:![0-9]*]]}
  ; CHECK: [[MF2]] = !DIMacroFile(
  ; CHECK-SAME: file: [[F2:![0-9]*]]
  ; CHECK: [[F2]] = !DIFile(filename: "y.h"

Side note: Is there any reason we're creating DIMacroFiles that have no macros in them? Or are they unnecessary?


https://reviews.llvm.org/D23056





More information about the llvm-commits mailing list