[llvm-commits] [123565] Need to check the correct return value for the call to addPassesToEmitFile .

bwendlin at apple.com bwendlin at apple.com
Wed Feb 7 17:42:34 PST 2007


Revision: 123565
Author:   bwendlin
Date:     2007-02-07 17:42:33 -0800 (Wed, 07 Feb 2007)

Log Message:
-----------
Need to check the correct return value for the call to addPassesToEmitFile.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-backend.cpp

Modified: apple-local/branches/llvm/gcc/llvm-backend.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-02-08 00:47:00 UTC (rev 123564)
+++ apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-02-08 01:42:33 UTC (rev 123565)
@@ -338,10 +338,11 @@
     }
 
     // Normal mode, emit a .s file by running the code generator.
-    if (TheTarget->addPassesToEmitFile(*PM, *AsmOutStream, 
+    if (TheTarget->addPassesToEmitFile(*PM, *AsmOutStream,
                                        TargetMachine::AssemblyFile,
-                                       /*FAST*/optimize == 0)) {
-      cerr << "Error interfacing to target machine!";
+                                       /*FAST*/optimize == 0)
+        == FileModel::Error) {
+      cerr << "Error interfacing to target machine!\n";
       exit(1);
     }
     





More information about the llvm-commits mailing list