[PATCH] D69822: [clang] Add new -fdebug-default-version flag.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 17:14:58 PST 2019


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good to me - but maybe give it a day to see if anyone else has further thoughts/that you've addressed their feedback too.



================
Comment at: clang/test/Driver/debug-default-version.c:9-17
+// The -isysroot is used as a hack to avoid LIT messing with the SDKROOT
+// environment variable which indirecty overrides the version in the target
+// triple used here.
+// RUN: %clang -### -target x86_64-apple-macosx10.11 -fdebug-default-version=5 -g -S -o - %s -isysroot %t 2>&1 | FileCheck %s --check-prefix=DWARF5
+// RUN: %clang -### -target x86_64-apple-darwin14 -g -fdebug-default-version=4 -S -o - %s -isysroot %t 2>&1 | FileCheck %s --check-prefix=DWARF4
+
+// RUN: %clang -### -target powerpc-unknown-openbsd -fdebug-default-version=4 -g -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF4
----------------
I'd probably skip these tests since overriding the platform default is already tested above (for the linux platform default) and I'm not sure there's much value add by testing that this overrides each platform default separately (given the platform default override is pretty orthogonal to which platform - it'd be pretty hard to introduce a bug that would break for one platform but not for all of them)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69822/new/

https://reviews.llvm.org/D69822





More information about the cfe-commits mailing list