diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-09-22 10:06:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-22 10:06:52 -0700 |
commit | bf9b3a51e4e8a393308bb0e4229e9eee92dc5811 (patch) | |
tree | 24c204e0762a801fac50d9bfe5e9c258cdcbfcad /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | beb743b9823d0ea6ce2e25c8520b588db8aa2314 (diff) | |
download | llvm-bf9b3a51e4e8a393308bb0e4229e9eee92dc5811.zip llvm-bf9b3a51e4e8a393308bb0e4229e9eee92dc5811.tar.gz llvm-bf9b3a51e4e8a393308bb0e4229e9eee92dc5811.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d05092a..0eac7c3 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -528,8 +528,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, if (!CGO.MSSecureHotPatchFunctionsFile.empty() || !CGO.MSSecureHotPatchFunctionsList.empty()) { if (!CGO.MSSecureHotPatchFunctionsFile.empty()) { - auto BufOrErr = - llvm::MemoryBuffer::getFile(CGO.MSSecureHotPatchFunctionsFile); + auto BufOrErr = FS->getBufferForFile(CGO.MSSecureHotPatchFunctionsFile); if (BufOrErr) { const llvm::MemoryBuffer &FileBuffer = **BufOrErr; for (llvm::line_iterator I(FileBuffer.getMemBufferRef(), true), E; |