[llvm-commits] CVS: llvm/tools/llc/llc.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 29 15:13:08 PST 2002


Changes in directory llvm/tools/llc:

llc.cpp updated: 1.61 -> 1.62

---
Log message:

Allow TargetMachine to refuse static code gen


---
Diffs of the changes:

Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.61 llvm/tools/llc/llc.cpp:1.62
--- llvm/tools/llc/llc.cpp:1.61	Tue Oct 29 14:45:04 2002
+++ llvm/tools/llc/llc.cpp	Tue Oct 29 15:12:46 2002
@@ -281,10 +281,14 @@
         }
     }
 
-  Target.addPassesToEmitAssembly(Passes, *Out);
-
-  // Run our queue of passes all at once now, efficiently.
-  Passes.run(*M.get());
+  // Ask the target to add backend passes as neccesary
+  if (Target.addPassesToEmitAssembly(Passes, *Out)) {
+    cerr << argv[0] << ": target '" << Target.TargetName
+         << " does not support static compilation!\n";
+  } else {
+    // Run our queue of passes all at once now, efficiently.
+    Passes.run(*M.get());
+  }
 
   // Delete the ostream if it's not a stdout stream
   if (Out != &std::cout) delete Out;





More information about the llvm-commits mailing list