From ae5e5f2011d583b9462a5747e22a0727a1b9b3bf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 28 Aug 2021 22:36:37 +0200 Subject: [PATCH] [llc] Initialize context for parsing options This will allow using -force-opaque-pointers in codegen tests. --- llvm/tools/llc/llc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 58f19b2..dd90e82 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -329,8 +329,6 @@ int main(int argc, char **argv) { // Enable debug stream buffering. EnableDebugBuffering = true; - LLVMContext Context; - // Initialize targets first, so that --version shows registered targets. InitializeAllTargets(); InitializeAllTargetMCs(); @@ -365,6 +363,7 @@ int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n"); + LLVMContext Context; Context.setDiscardValueNames(DiscardValueNames); // Set a diagnostic handler that doesn't exit on the first error -- 2.7.4