Skip to content

Commit 1e08544

Browse files
committed
[PS4] Fix header search list
A missing "break" in the initial implementation had us adding a spurious "/usr/include" to the header search list. Later someone introduced LLVM_FALLTHROUGH to prevent a warning. Replace this with the correct "break" and make sure the extra directory isn't added to the PS4 header search list.
1 parent 15a1769 commit 1e08544

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/Lex/InitHeaderSearch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
372372
AddPath(BaseSDKPath + "/target/include", System, false);
373373
if (triple.isPS4())
374374
AddPath(BaseSDKPath + "/target/include_common", System, false);
375-
LLVM_FALLTHROUGH;
375+
break;
376376
}
377377
default:
378378
AddPath("/usr/include", ExternCSystem, false);

clang/test/Driver/ps4-header-search.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
// 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
44
// ENVPS4: Inputs/scei-ps4_tree/target/include{{$}}
55
// ENVPS4: Inputs/scei-ps4_tree/target/include_common{{$}}
6+
// ENVPS4-NOT: /usr/include
67

78
// RUN: %clang -isysroot %S/Inputs/scei-ps4_tree -target x86_64-scei-ps4 -E -v %s 2>&1 | FileCheck %s --check-prefix=SYSROOTPS4
89
// SYSROOTPS4: "{{[^"]*}}clang{{[^"]*}}"
910
// SYSROOTPS4: Inputs/scei-ps4_tree/target/include{{$}}
1011
// SYSROOTPS4: Inputs/scei-ps4_tree/target/include_common{{$}}
12+
// SYSROOTPS4-NOT: /usr/include

0 commit comments

Comments
 (0)