[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-10 Thread Snehasish Kumar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG157cd93b48a9: [clang] Disallow fbasic-block-sections on non-ELF, non-x86 targets. (authored by snehasish). Repository: rG LLVM Github Monorepo

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87426/new/ https://reviews.llvm.org/D87426

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-10 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish marked 4 inline comments as done. snehasish added a comment. Thanks for explaining the rationale, PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87426/new/ https://reviews.llvm.org/D87426

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-10 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290884. snehasish marked an inline comment as done. snehasish added a comment. Update test to use `not` tool and `-c` flag. - Use the not tool to indicate failure is expected. - Use -c instead of -### for failing invocations. Repository: rG LLVM Github

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args) << TripleStr; snehasish wrote: > MaskRay wrote: > > This should be an

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish marked 3 inline comments as done. snehasish added a comment. Thanks for the quick review @MaskRay, PTAL. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args)

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290867. snehasish added a comment. Update test based on review comments. - Use diag::err instead of warn. - Drop linux-gnu from the triple for the default test. - Check for the presence of the diagnostic message. Repository: rG LLVM Github Monorepo

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args) << TripleStr; This should be an error Comment at:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: clang/test/Driver/fbasic-block-sections.c:12 // CHECK-OPT-LABELS: "-fbasic-block-sections=labels" +// CHECK-TRIPLE-NOT:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fbasic-block-sections.c:1 -// RUN: %clang -### -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s -// RUN: %clang -### -fbasic-block-sections=all %s -S 2>&1 | FileCheck

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290863. snehasish added a comment. Specify triple for driver tests, address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87426/new/ https://reviews.llvm.org/D87426 Files:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Rahman Lavaee via Phabricator via cfe-commits
rahmanl accepted this revision. rahmanl added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/fbasic-block-sections.c:11 // CHECK-OPT-LABELS: "-fbasic-block-sections=labels" +// CHECK-NOOPT-NOT: "-fbasic-block-sections"

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish created this revision. snehasish added reviewers: tmsriram, rahmanl. Herald added a project: clang. Herald added a subscriber: cfe-commits. snehasish requested review of this revision. Basic block sections is untested on other platforms and binary formats apart from x86,elf. This patch