diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index f8e311c7c35a..c94640c31c50 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -3027,14 +3027,6 @@ void PragmaCommentHandler::HandlePragma(Preprocessor &PP, return; } - // On PS4, issue a warning about any pragma comments other than - // #pragma comment lib. - if (PP.getTargetInfo().getTriple().isPS4() && Kind != PCK_Lib) { - PP.Diag(Tok.getLocation(), diag::warn_pragma_comment_ignored) - << II->getName(); - return; - } - // Read the optional string if present. PP.Lex(Tok); std::string ArgumentString; diff --git a/clang/test/CodeGen/pragma-comment.c b/clang/test/CodeGen/pragma-comment.c index 25675d94c5a4..a4746f5c47bf 100644 --- a/clang/test/CodeGen/pragma-comment.c +++ b/clang/test/CodeGen/pragma-comment.c @@ -4,6 +4,7 @@ // RUN: %clang_cc1 %s -triple thumbv7-linux-gnueabihf -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options // RUN: %clang_cc1 %s -triple i686-pc-linux -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options // RUN: %clang_cc1 %s -triple x86_64-scei-ps4 -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options +// RUN: %clang_cc1 %s -triple x86_64-sie-ps5 -fms-extensions -emit-llvm -o - | FileCheck -check-prefix ELF %s --implicit-check-not llvm.linker.options // RUN: %clang_cc1 %s -triple aarch64-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s #pragma comment(lib, "msvcrt.lib") diff --git a/clang/test/Preprocessor/pragma_ps4.c b/clang/test/Preprocessor/pragma-comment-elf.c similarity index 79% rename from clang/test/Preprocessor/pragma_ps4.c rename to clang/test/Preprocessor/pragma-comment-elf.c index 63651b6a96fb..7b84aba51a0d 100644 --- a/clang/test/Preprocessor/pragma_ps4.c +++ b/clang/test/Preprocessor/pragma-comment-elf.c @@ -1,6 +1,8 @@ -// RUN: %clang_cc1 %s -triple x86_64-scei-ps4 -fsyntax-only -verify -fms-extensions +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-scei-ps4 +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-sie-ps5 +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple i686-unknown-linux-gnu -// On PS4, issue a diagnostic that pragma comments are ignored except: +// On ELF targets, issue a diagnostic that pragma comments are ignored except: // #pragma comment lib #pragma comment(lib) diff --git a/clang/test/Preprocessor/pragma-comment-linux.c b/clang/test/Preprocessor/pragma-comment-linux.c deleted file mode 100644 index fcac049f46e8..000000000000 --- a/clang/test/Preprocessor/pragma-comment-linux.c +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fsyntax-only -verify %s -Wunknown-pragmas - -#pragma comment(linker, "") -// expected-warning@-1 {{'#pragma comment linker' ignored}} -