From 9f75a55329d5157c67fe9f800ca5a7472634e44b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 14 Feb 2004 06:00:36 +0000 Subject: [PATCH] finegrainify namespacification, fix 80col prob llvm-svn: 11445 --- llvm/lib/Target/X86/InstSelectSimple.cpp | 4 ++-- llvm/lib/Target/X86/Printer.cpp | 7 ++----- llvm/lib/Target/X86/X86RegisterInfo.cpp | 8 +------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp index d4a5ac2d8606..6129c744ca3b 100644 --- a/llvm/lib/Target/X86/InstSelectSimple.cpp +++ b/llvm/lib/Target/X86/InstSelectSimple.cpp @@ -1257,7 +1257,7 @@ void ISel::visitIntrinsicCall(Intrinsic::ID ID, CallInst &CI) { switch (Align & 3) { case 2: // WORD aligned if (ConstantInt *I = dyn_cast(CI.getOperand(3))) { - CountReg = getReg(ConstantUInt::get(Type::UIntTy, I->getRawValue()/2)); + CountReg =getReg(ConstantUInt::get(Type::UIntTy, I->getRawValue()/2)); } else { CountReg = makeAnotherReg(Type::IntTy); BuildMI(BB, X86::SHRir32, 2, CountReg).addReg(ByteReg).addZImm(1); @@ -1267,7 +1267,7 @@ void ISel::visitIntrinsicCall(Intrinsic::ID ID, CallInst &CI) { break; case 0: // DWORD aligned if (ConstantInt *I = dyn_cast(CI.getOperand(3))) { - CountReg = getReg(ConstantUInt::get(Type::UIntTy, I->getRawValue()/4)); + CountReg =getReg(ConstantUInt::get(Type::UIntTy, I->getRawValue()/4)); } else { CountReg = makeAnotherReg(Type::IntTy); BuildMI(BB, X86::SHRir32, 2, CountReg).addReg(ByteReg).addZImm(2); diff --git a/llvm/lib/Target/X86/Printer.cpp b/llvm/lib/Target/X86/Printer.cpp index 840aa4a9415e..f591612aea30 100644 --- a/llvm/lib/Target/X86/Printer.cpp +++ b/llvm/lib/Target/X86/Printer.cpp @@ -28,8 +28,7 @@ #include "Support/Statistic.h" #include "Support/StringExtras.h" #include "Support/CommandLine.h" - -namespace llvm { +using namespace llvm; namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); @@ -91,7 +90,7 @@ namespace { /// using the given target machine description. This should work /// regardless of whether the function is in SSA form. /// -FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm){ +FunctionPass *llvm::createX86CodePrinterPass(std::ostream &o,TargetMachine &tm){ return new Printer(o, tm); } @@ -946,5 +945,3 @@ bool Printer::doFinalization(Module &M) { delete Mang; return false; // success } - -} // End llvm namespace diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index b2bf61ad3ed8..8d3aa9126658 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -26,7 +26,7 @@ #include "Support/CommandLine.h" #include "Support/STLExtras.h" -namespace llvm { +using namespace llvm; namespace { cl::opt @@ -253,12 +253,8 @@ int X86RegisterInfo::emitEpilogue(MachineFunction &MF, return MBB.size() - oldSize; } -} // End llvm namespace - #include "X86GenRegisterInfo.inc" -namespace llvm { - const TargetRegisterClass* X86RegisterInfo::getRegClassForType(const Type* Ty) const { switch (Ty->getPrimitiveID()) { @@ -278,5 +274,3 @@ X86RegisterInfo::getRegClassForType(const Type* Ty) const { case Type::DoubleTyID: return &RFPInstance; } } - -} // End llvm namespace