[PATCH] D46788: llc: don't call llvm_shutdown twice

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 17:21:05 PDT 2018


jfb created this revision.
jfb added a reviewer: ruiu.
Herald added subscribers: llvm-commits, aheejin.

InitLLVM already calls llvm_shutdown, but llc registers for shutdown
with llvm_shutdown_obj so it gets called twice. It's not hurting anything, but
it's also not useful, so don't do it.


Repository:
  rL LLVM

https://reviews.llvm.org/D46788

Files:
  tools/llc/llc.cpp


Index: tools/llc/llc.cpp
===================================================================
--- tools/llc/llc.cpp
+++ tools/llc/llc.cpp
@@ -274,7 +274,6 @@
   EnableDebugBuffering = true;
 
   LLVMContext Context;
-  llvm_shutdown_obj Y;  // Call llvm_shutdown() on exit.
 
   // Initialize targets first, so that --version shows registered targets.
   InitializeAllTargets();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46788.146447.patch
Type: text/x-patch
Size: 378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180512/8a1b6919/attachment.bin>


More information about the llvm-commits mailing list