Add braces to clarify if/else structure and remove warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2009-06-18 03:01:42 +00:00
parent f9f1da17f8
commit b4b0fc28bc

View 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;
}