Skip to content

Commit bf9b3a5

Browse files
authored
[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.
1 parent beb743b commit bf9b3a5

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)