[llvm-commits] CVS: llvm/lib/CodeGen/Passes.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 28 02:01:01 PST 2003
Changes in directory llvm/lib/CodeGen:
Passes.cpp updated: 1.4 -> 1.5
---
Log message:
finegrainify namespacification
minor cleanups
---
Diffs of the changes: (+7 -9)
Index: llvm/lib/CodeGen/Passes.cpp
diff -u llvm/lib/CodeGen/Passes.cpp:1.4 llvm/lib/CodeGen/Passes.cpp:1.5
--- llvm/lib/CodeGen/Passes.cpp:1.4 Wed Nov 19 21:32:25 2003
+++ llvm/lib/CodeGen/Passes.cpp Sun Dec 28 01:59:53 2003
@@ -1,4 +1,4 @@
-//===-- Passes.cpp - Target independent code generation passes -*- C++ -*-===//
+//===-- Passes.cpp - Target independent code generation passes ------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,8 +14,8 @@
#include "llvm/CodeGen/Passes.h"
#include "Support/CommandLine.h"
-
-namespace llvm {
+#include <iostream>
+using namespace llvm;
namespace {
enum RegAllocName { simple, local, linearscan };
@@ -31,19 +31,17 @@
cl::init(local));
}
-FunctionPass *createRegisterAllocator()
-{
+FunctionPass *llvm::createRegisterAllocator() {
switch (RegAlloc) {
+ default:
+ std::cerr << "no register allocator selected";
+ abort();
case simple:
return createSimpleRegisterAllocator();
case local:
return createLocalRegisterAllocator();
case linearscan:
return createLinearScanRegisterAllocator();
- default:
- assert(0 && "no register allocator selected");
- return 0; // not reached
}
}
-} // End llvm namespace
More information about the llvm-commits
mailing list