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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 17:53:02 PST 2019


MaskRay added inline comments.


================
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
----------------
dblaikie wrote:
> 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)
We may need -Werror in some or all of the tests.


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

https://reviews.llvm.org/D69822





More information about the cfe-commits mailing list