[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 20 10:50:03 PDT 2003
Changes in directory llvm/tools/llc:
llc.cpp updated: 1.76 -> 1.77
---
Log message:
Minor cleanups
---
Diffs of the changes:
Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.76 llvm/tools/llc/llc.cpp:1.77
--- llvm/tools/llc/llc.cpp:1.76 Wed Jun 18 16:43:33 2003
+++ llvm/tools/llc/llc.cpp Fri Jun 20 10:49:04 2003
@@ -1,6 +1,6 @@
-//===-- llc.cpp - Implement the LLVM Compiler -----------------------------===//
+//===-- llc.cpp - Implement the LLVM Native Code Generator ----------------===//
//
-// This is the llc compiler driver.
+// This is the llc code generator.
//
//===----------------------------------------------------------------------===//
@@ -15,11 +15,6 @@
#include "Support/Signals.h"
#include <memory>
#include <fstream>
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-// Option declarations for LLC.
-//------------------------------------------------------------------------------
// General options for llc. Other pass-specific options are specified
// within the corresponding llc passes, and target-specific options
@@ -58,29 +53,22 @@
}
-//===---------------------------------------------------------------------===//
-// Function main()
-//
-// Entry point for the llc compiler.
-//===---------------------------------------------------------------------===//
-
-int
-main(int argc, char **argv)
-{
+// main - Entry point for the llc compiler.
+//
+int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm system compiler\n");
// Load the module to be compiled...
std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename));
- if (M.get() == 0)
- {
- std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
- return 1;
- }
+ if (M.get() == 0) {
+ std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
+ return 1;
+ }
Module &mod = *M.get();
// Allocate target machine. First, check whether the user has
// explicitly specified an architecture to compile for.
- unsigned Config = (mod.isLittleEndian() ? TM::LittleEndian : TM::BigEndian) |
+ unsigned Config = (mod.isLittleEndian() ? TM::LittleEndian : TM::BigEndian)|
(mod.has32BitPointers() ? TM::PtrSize32 : TM::PtrSize64);
TargetMachine* (*TargetMachineAllocator)(unsigned) = 0;
switch (Arch) {
More information about the llvm-commits
mailing list