[PATCH] Fix bug 19437 - Only add discriminators for DWARF 4 and above.

Diego Novillo dnovillo at google.com
Thu Apr 17 14:19:56 PDT 2014



================
Comment at: test/Transforms/AddDiscriminators/no-discriminators.ll:1
@@ +1,2 @@
+; RUN: opt < %s -add-discriminators -S | FileCheck %s
+
----------------
David Blaikie wrote:
> You should be able to take an existing test case and just ad another RUN line with a specified dwarf version (there should be an opt flag to override the version... but it looks like that flag only works in DwarfDebug & would need to be moved/refactored in some way (possibly as a real option for opt/llc/llvm-mc/etc)) & demonstrate that the discriminators no longer appear. We have tests like this for other dwarf version-specific features already (but they're all in DWARF generation in DwarfDebug, rather than an opt pass like this).
The pass can only rely on what's in the IR. It's not affected by flags, other than the specific one that tells it not to bother. Not sure I'm following you here.


http://reviews.llvm.org/D3413






More information about the llvm-commits mailing list