Skip to content

Commit d03e991

Browse files
committed
[NFC] Internalize the LLVMContext for LLVMOpt
1 parent bc31c7f commit d03e991

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/swift-llvm-opt/LLVMOpt.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ int main(int argc, char **argv) {
252252
llvm::SMDiagnostic Err;
253253

254254
// Load the input module...
255+
auto LLVMContext = std::make_unique<llvm::LLVMContext>();
255256
std::unique_ptr<Module> M =
256-
parseIRFile(InputFilename, Err, getGlobalLLVMContext());
257+
parseIRFile(InputFilename, Err, *LLVMContext.get());
257258

258259
if (!M) {
259260
Err.print(argv[0], errs());

0 commit comments

Comments
 (0)