radeon/llvm: Don't print an error message when there is no error
authorTom Stellard <thomas.stellard@amd.com>
Fri, 20 Apr 2012 13:12:47 +0000 (09:12 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 23 Apr 2012 13:34:05 +0000 (09:34 -0400)
A blank line with an empty error message was being printed even when the
target lookup succeeded.

src/gallium/drivers/radeon/radeon_llvm_emit.cpp

index b4825690104e00b6f8ae5cfab52ca0b03defb871..b409cb2175e64b681f28f51d0e6840ef0b43835f 100644 (file)
@@ -81,9 +81,8 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
 #endif
    std::string err;
    const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err);
-   fprintf(stderr, "%s\n", err.c_str());
    if(!AMDGPUTarget) {
-      fprintf(stderr, "Can't find target\n");
+      fprintf(stderr, "Can't find target: %s\n", err.c_str());
       return 1;
    }