Skip to content

Commit b3ebc62

Browse files
authored
[Driver][NFC] Update usage of array container used for triple aliases (#4016)
This class does not own the underlying data, it is expected to be used in situations where the data resides in some other buffer, whose lifetime extends past that of the ArrayRef. For this reason, it is not in general safe to store an ArrayRef. "Source: https://llvm.org/doxygen/classllvm_1_1ArrayRef.html
1 parent e946a0f commit b3ebc62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,8 +1858,8 @@ void Driver::PrintHelp(bool ShowHidden) const {
18581858
}
18591859

18601860
llvm::Triple Driver::MakeSYCLDeviceTriple(StringRef TargetArch) const {
1861-
ArrayRef<StringRef> SYCLAlias = {"spir", "spir64", "spir64_fpga",
1862-
"spir64_x86_64", "spir64_gen"};
1861+
SmallVector<StringRef, 5> SYCLAlias = {"spir", "spir64", "spir64_fpga",
1862+
"spir64_x86_64", "spir64_gen"};
18631863
if (std::find(SYCLAlias.begin(), SYCLAlias.end(), TargetArch) !=
18641864
SYCLAlias.end()) {
18651865
llvm::Triple TT;

0 commit comments

Comments
 (0)