Skip to content

Commit d8dc715

Browse files
jansvoboda11github-actions[bot]
authored andcommitted
Automerge: [clang] Load -fms-secure-hotpatch-functions-file= through the VFS (#160146)
This PR uses the correctly-configured VFS to load the file specified via `-fms-secure-hotpatch-functions-file=`, matching other input files of the compiler.
2 parents 32f07e1 + bf9b3a5 commit d8dc715

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@ CodeGenModule::CodeGenModule(ASTContext &C,
528528
if (!CGO.MSSecureHotPatchFunctionsFile.empty() ||
529529
!CGO.MSSecureHotPatchFunctionsList.empty()) {
530530
if (!CGO.MSSecureHotPatchFunctionsFile.empty()) {
531-
auto BufOrErr =
532-
llvm::MemoryBuffer::getFile(CGO.MSSecureHotPatchFunctionsFile);
531+
auto BufOrErr = FS->getBufferForFile(CGO.MSSecureHotPatchFunctionsFile);
533532
if (BufOrErr) {
534533
const llvm::MemoryBuffer &FileBuffer = **BufOrErr;
535534
for (llvm::line_iterator I(FileBuffer.getMemBufferRef(), true), E;

0 commit comments

Comments
 (0)