diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp index 2233c9fa114bc9..86c6768d0d9fac 100644 --- a/clang/lib/Lex/InitHeaderSearch.cpp +++ b/clang/lib/Lex/InitHeaderSearch.cpp @@ -372,7 +372,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, AddPath(BaseSDKPath + "/target/include", System, false); if (triple.isPS4()) AddPath(BaseSDKPath + "/target/include_common", System, false); - LLVM_FALLTHROUGH; + break; } default: AddPath("/usr/include", ExternCSystem, false); diff --git a/clang/test/Driver/ps4-header-search.c b/clang/test/Driver/ps4-header-search.c index 3afef698d26422..20aaa5f97a749c 100644 --- a/clang/test/Driver/ps4-header-search.c +++ b/clang/test/Driver/ps4-header-search.c @@ -3,8 +3,10 @@ // RUN: env SCE_ORBIS_SDK_DIR=%S/Inputs/scei-ps4_tree %clang -target x86_64-scei-ps4 -E -v %s 2>&1 | FileCheck %s --check-prefix=ENVPS4 // ENVPS4: Inputs/scei-ps4_tree/target/include{{$}} // ENVPS4: Inputs/scei-ps4_tree/target/include_common{{$}} +// ENVPS4-NOT: /usr/include // RUN: %clang -isysroot %S/Inputs/scei-ps4_tree -target x86_64-scei-ps4 -E -v %s 2>&1 | FileCheck %s --check-prefix=SYSROOTPS4 // SYSROOTPS4: "{{[^"]*}}clang{{[^"]*}}" // SYSROOTPS4: Inputs/scei-ps4_tree/target/include{{$}} // SYSROOTPS4: Inputs/scei-ps4_tree/target/include_common{{$}} +// SYSROOTPS4-NOT: /usr/include