[llvm] c5fa6b1 - llvm-reduce: Parse file from the opened buffer instead of the file
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 16:15:09 PST 2023
Author: Matt Arsenault
Date: 2023-01-27T20:14:36-04:00
New Revision: c5fa6b1610a3a665c22f70314ed65e7230091028
URL: https://github.com/llvm/llvm-project/commit/c5fa6b1610a3a665c22f70314ed65e7230091028
DIFF: https://github.com/llvm/llvm-project/commit/c5fa6b1610a3a665c22f70314ed65e7230091028.diff
LOG: llvm-reduce: Parse file from the opened buffer instead of the file
If this wasn't bitcode this was opening a second MemoryBuffer.
Added:
Modified:
llvm/tools/llvm-reduce/ReducerWorkItem.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
index dc64b44a33ad..194f7e560438 100644
--- a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
+++ b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
@@ -807,7 +807,7 @@ llvm::parseReducerWorkItem(StringRef ToolName, StringRef Filename,
if (!isBitcode((const unsigned char *)(*MB)->getBufferStart(),
(const unsigned char *)(*MB)->getBufferEnd())) {
- std::unique_ptr<Module> Result = parseIRFile(Filename, Err, Ctxt);
+ std::unique_ptr<Module> Result = parseIR(**MB, Err, Ctxt);
if (!Result) {
Err.print(ToolName.data(), errs());
return {nullptr, false};
More information about the llvm-commits
mailing list