Add braces to clarify if/else structure and remove warning.
authorNick Lewycky <nicholas@mxc.ca>
Thu, 18 Jun 2009 03:01:42 +0000 (03:01 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 18 Jun 2009 03:01:42 +0000 (03:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73673 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Pass.cpp

index bacabc96d76a41dc153de6c337757ae5ebc089e4..579f1029ac378a8963348c84ed2921e12f6fac21 100644 (file)
@@ -197,7 +197,7 @@ static PassRegistrar *getPassRegistrar() {
   
   // Use double-checked locking to safely initialize the registrar when
   // we're running in multithreaded mode.
-  if (!PassRegistrarObj)
+  if (!PassRegistrarObj) {
     if (llvm_is_multithreaded()) {
       llvm_acquire_global_lock();
       if (!PassRegistrarObj) {
@@ -208,6 +208,7 @@ static PassRegistrar *getPassRegistrar() {
       llvm_release_global_lock();
     } else
       PassRegistrarObj = new PassRegistrar();
+  }
   return PassRegistrarObj;
 }