Skip to content

Commit 5454304

Browse files
committed
[clang] Load -fms-secure-hotpatch-functions-file= through the VFS (llvm#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.
1 parent bf1dce3 commit 5454304

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
@@ -531,8 +531,7 @@ CodeGenModule::CodeGenModule(ASTContext &C,
531531
if (!CGO.MSSecureHotPatchFunctionsFile.empty() ||
532532
!CGO.MSSecureHotPatchFunctionsList.empty()) {
533533
if (!CGO.MSSecureHotPatchFunctionsFile.empty()) {
534-
auto BufOrErr =
535-
llvm::MemoryBuffer::getFile(CGO.MSSecureHotPatchFunctionsFile);
534+
auto BufOrErr = FS->getBufferForFile(CGO.MSSecureHotPatchFunctionsFile);
536535
if (BufOrErr) {
537536
const llvm::MemoryBuffer &FileBuffer = **BufOrErr;
538537
for (llvm::line_iterator I(FileBuffer.getMemBufferRef(), true), E;

0 commit comments

Comments
 (0)