[clang][deps][NFC] Replace a vector with an array (#169555)

`ResourceDirectoryCache::findResourceDir` uses a `std::vector` when a
`std::array` would do.
This commit is contained in:
David Stone
2025-12-02 09:24:05 -07:00
committed by GitHub
parent e07e60e5dc
commit c21fd448a3

View File

@@ -284,11 +284,9 @@ public:
if (CachedResourceDir != Cache.end())
return CachedResourceDir->second;
std::vector<StringRef> PrintResourceDirArgs{ClangBinaryName};
if (ClangCLMode)
PrintResourceDirArgs.push_back("/clang:-print-resource-dir");
else
PrintResourceDirArgs.push_back("-print-resource-dir");
const std::array<StringRef, 2> PrintResourceDirArgs{
ClangBinaryName,
ClangCLMode ? "/clang:-print-resource-dir" : "-print-resource-dir"};
llvm::SmallString<64> OutputFile, ErrorFile;
llvm::sys::fs::createTemporaryFile("print-resource-dir-output",