Skip to content

Commit c5fa6b1

Browse files
committed
llvm-reduce: Parse file from the opened buffer instead of the file
If this wasn't bitcode this was opening a second MemoryBuffer.
1 parent c0a10b2 commit c5fa6b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/tools/llvm-reduce/ReducerWorkItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ llvm::parseReducerWorkItem(StringRef ToolName, StringRef Filename,
807807

808808
if (!isBitcode((const unsigned char *)(*MB)->getBufferStart(),
809809
(const unsigned char *)(*MB)->getBufferEnd())) {
810-
std::unique_ptr<Module> Result = parseIRFile(Filename, Err, Ctxt);
810+
std::unique_ptr<Module> Result = parseIR(**MB, Err, Ctxt);
811811
if (!Result) {
812812
Err.print(ToolName.data(), errs());
813813
return {nullptr, false};

0 commit comments

Comments
 (0)