Missing “if (log)” on a log printf.
authorJim Ingham <jingham@apple.com>
Mon, 26 Nov 2012 19:54:04 +0000 (19:54 +0000)
committerJim Ingham <jingham@apple.com>
Mon, 26 Nov 2012 19:54:04 +0000 (19:54 +0000)
llvm-svn: 168602

lldb/source/Expression/IRForTarget.cpp

index 967b2c4..ef76b9d 100644 (file)
@@ -2679,9 +2679,10 @@ IRForTarget::StripAllGVs (Module &llvm_module)
 
         GlobalValue::use_iterator ui = global_var->use_begin();
         
-        log->Printf("Couldn't remove %s because of %s",
-                    PrintValue(global_var).c_str(),
-                    PrintValue(*ui).c_str());
+        if (log)
+            log->Printf("Couldn't remove %s because of %s",
+                        PrintValue(global_var).c_str(),
+                        PrintValue(*ui).c_str());
     }
     
     return true;