Author: Yaxun (Sam) Liu Date: 2022-04-26T10:36:36-04:00 New Revision: c89433d7fa10f9a3fe3858ac455ece5913092107
URL: https://github.com/llvm/llvm-project/commit/c89433d7fa10f9a3fe3858ac455ece5913092107 DIFF: https://github.com/llvm/llvm-project/commit/c89433d7fa10f9a3fe3858ac455ece5913092107.diff LOG: [HIP] Fix diag msg about sanitizer Fix the misleading diag msg as the option is ignored for a particular offload arch only. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D124396 Added: Modified: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/test/Driver/hip-sanitize-options.hip Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 5fbe3cf8cf295..80f16749fdc12 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -107,8 +107,8 @@ def err_drv_bad_offload_arch_combo : Error< "a feature should either exist in all offload archs, or not exist in any " "offload archs)">; def warn_drv_unsupported_option_for_offload_arch_req_feature : Warning< - "ignoring '%0' option as it is not currently supported for " - "offload arch '%1'. Use it with an offload arch containing '%2' instead">, + "ignoring '%0' option for offload arch '%1' as it is not currently supported " + "there. Use it with an offload arch containing '%2' instead">, InGroup<OptionIgnored>; def warn_drv_unsupported_option_for_target : Warning< "ignoring '%0' option as it is not currently supported for target '%1'">, diff --git a/clang/test/Driver/hip-sanitize-options.hip b/clang/test/Driver/hip-sanitize-options.hip index ad7ae72fd2b8a..4ecb1b3e89e04 100644 --- a/clang/test/Driver/hip-sanitize-options.hip +++ b/clang/test/Driver/hip-sanitize-options.hip @@ -65,8 +65,8 @@ // FAIL: AMDGPU address sanitizer runtime library (asanrtl) is not found. Please install ROCm device library which supports address sanitizer // XNACK-DAG: warning: ignoring '-fsanitize=leak' option as it is not currently supported for target 'amdgcn-amd-amdhsa' -// XNACK-DAG: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx900:xnack-'. Use it with an offload arch containing 'xnack+' instead -// XNACK-DAG: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx906'. Use it with an offload arch containing 'xnack+' instead +// XNACK-DAG: warning: ignoring '-fsanitize=address' option for offload arch 'gfx900:xnack-' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead +// XNACK-DAG: warning: ignoring '-fsanitize=address' option for offload arch 'gfx906' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead // XNACK-DAG: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address"}} // XNACK-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "-xnack"}} // XNACK-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx906"}} @@ -85,8 +85,8 @@ // NOGPU-DAG: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx906"}} // NOGPU-DAG: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address,leak"}} // NOGPUNEG-NOT: warning: ignoring '-fsanitize=leak' option as it is not currently supported for target 'amdgcn-amd-amdhsa' -// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx900:xnack-'. Use it with an offload arch containing 'xnack+' instead -// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option as it is not currently supported for offload arch 'gfx906'. Use it with an offload arch containing 'xnack+' instead +// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option for offload arch 'gfx900:xnack-' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead +// NOGPUNEG-NOT: warning: ignoring '-fsanitize=address' option for offload arch 'gfx906' as it is not currently supported there. Use it with an offload arch containing 'xnack+' instead // NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address"}} // NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "\+xnack".* "-fsanitize=address,leak"}} // NOGPUNEG-NOT: {{"[^"]*clang[^"]*".* "-target-cpu" "gfx900".* "-target-feature" "-xnack".* "-fsanitize=address,leak"}} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits