From: Chris Lattner Date: Thu, 15 Jul 2004 02:14:30 +0000 (+0000) Subject: Patches towards fixing PR341 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=76e2df264560b6c5aae1b820a6ccfdf0615bb935;p=oota-llvm.git Patches towards fixing PR341 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14841 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index a7c2bd5fc21..139320f6403 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -273,7 +273,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, case Type::FloatTyID: return Out << "float " << NameSoFar; case Type::DoubleTyID: return Out << "double " << NameSoFar; default : - std::cerr << "Unknown primitive type: " << Ty << "\n"; + std::cerr << "Unknown primitive type: " << *Ty << "\n"; abort(); } @@ -517,7 +517,7 @@ void CWriter::printConstant(Constant *CPV) { default: std::cerr << "CWriter Error: Unhandled constant expression: " - << CE << "\n"; + << *CE << "\n"; abort(); } } @@ -626,7 +626,7 @@ void CWriter::printConstant(Constant *CPV) { } // FALL THROUGH default: - std::cerr << "Unknown constant type: " << CPV << "\n"; + std::cerr << "Unknown constant type: " << *CPV << "\n"; abort(); } } diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index a7c2bd5fc21..139320f6403 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -273,7 +273,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, case Type::FloatTyID: return Out << "float " << NameSoFar; case Type::DoubleTyID: return Out << "double " << NameSoFar; default : - std::cerr << "Unknown primitive type: " << Ty << "\n"; + std::cerr << "Unknown primitive type: " << *Ty << "\n"; abort(); } @@ -517,7 +517,7 @@ void CWriter::printConstant(Constant *CPV) { default: std::cerr << "CWriter Error: Unhandled constant expression: " - << CE << "\n"; + << *CE << "\n"; abort(); } } @@ -626,7 +626,7 @@ void CWriter::printConstant(Constant *CPV) { } // FALL THROUGH default: - std::cerr << "Unknown constant type: " << CPV << "\n"; + std::cerr << "Unknown constant type: " << *CPV << "\n"; abort(); } } diff --git a/lib/Target/PowerPC/Makefile b/lib/Target/PowerPC/Makefile index ef9fff7377b..1aa9b8e7330 100644 --- a/lib/Target/PowerPC/Makefile +++ b/lib/Target/PowerPC/Makefile @@ -7,7 +7,8 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = powerpc +LIBRARYNAME = powerpc2 +SHARED_LIBRARY=1 include $(LEVEL)/Makefile.common # Make sure that tblgen is run, first thing. diff --git a/lib/Target/PowerPC/PPC32ISelSimple.cpp b/lib/Target/PowerPC/PPC32ISelSimple.cpp index 10a19b55246..6ce7f76ed4e 100644 --- a/lib/Target/PowerPC/PPC32ISelSimple.cpp +++ b/lib/Target/PowerPC/PPC32ISelSimple.cpp @@ -529,7 +529,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, unsigned AddrReg = getReg(CPR->getValue(), MBB, IP); BuildMI(*MBB, IP, PPC32::OR, 2, R).addReg(AddrReg).addReg(AddrReg); } else { - std::cerr << "Offending constant: " << C << "\n"; + std::cerr << "Offending constant: " << *C << "\n"; assert(0 && "Type not handled yet!"); } } diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 25c7fc0959e..7d875dd631d 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -25,7 +25,7 @@ using namespace llvm; namespace { // Register the target. - RegisterTarget X("powerpc", " PowerPC (experimental)"); + RegisterTarget X("powerpc2", " PowerPC X (experimental)"); } unsigned PowerPCTargetMachine::getJITMatchQuality() { diff --git a/lib/Target/PowerPC/PowerPCISelSimple.cpp b/lib/Target/PowerPC/PowerPCISelSimple.cpp index 10a19b55246..6ce7f76ed4e 100644 --- a/lib/Target/PowerPC/PowerPCISelSimple.cpp +++ b/lib/Target/PowerPC/PowerPCISelSimple.cpp @@ -529,7 +529,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, unsigned AddrReg = getReg(CPR->getValue(), MBB, IP); BuildMI(*MBB, IP, PPC32::OR, 2, R).addReg(AddrReg).addReg(AddrReg); } else { - std::cerr << "Offending constant: " << C << "\n"; + std::cerr << "Offending constant: " << *C << "\n"; assert(0 && "Type not handled yet!"); } } diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp index 675bc2d58ab..cc22b3774a1 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp @@ -124,21 +124,21 @@ void VRegNode::dumpNode(int indent) const { for (int i=0; i < indent; i++) std::cerr << " "; - std::cerr << "VReg " << getValue() << "\n"; + std::cerr << "VReg " << *getValue() << "\n"; } void ConstantNode::dumpNode(int indent) const { for (int i=0; i < indent; i++) std::cerr << " "; - std::cerr << "Constant " << getValue() << "\n"; + std::cerr << "Constant " << *getValue() << "\n"; } void LabelNode::dumpNode(int indent) const { for (int i=0; i < indent; i++) std::cerr << " "; - std::cerr << "Label " << getValue() << "\n"; + std::cerr << "Label " << *getValue() << "\n"; } //------------------------------------------------------------------------ diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 68a602b3143..06165e9f6e1 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -507,7 +507,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, return; default: - std::cerr << "Offending expr: " << C << "\n"; + std::cerr << "Offending expr: " << *C << "\n"; assert(0 && "Constant expression not yet handled!\n"); } } @@ -557,7 +557,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, } else if (ConstantPointerRef *CPR = dyn_cast(C)) { BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue()); } else { - std::cerr << "Offending constant: " << C << "\n"; + std::cerr << "Offending constant: " << *C << "\n"; assert(0 && "Type not handled yet!"); } } diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 68a602b3143..06165e9f6e1 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -507,7 +507,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, return; default: - std::cerr << "Offending expr: " << C << "\n"; + std::cerr << "Offending expr: " << *C << "\n"; assert(0 && "Constant expression not yet handled!\n"); } } @@ -557,7 +557,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, } else if (ConstantPointerRef *CPR = dyn_cast(C)) { BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue()); } else { - std::cerr << "Offending constant: " << C << "\n"; + std::cerr << "Offending constant: " << *C << "\n"; assert(0 && "Type not handled yet!"); } } diff --git a/lib/Target/X86/X86SimpInstrSelector.cpp b/lib/Target/X86/X86SimpInstrSelector.cpp index e310d04b3b4..9fd487374d8 100644 --- a/lib/Target/X86/X86SimpInstrSelector.cpp +++ b/lib/Target/X86/X86SimpInstrSelector.cpp @@ -433,7 +433,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, return; default: - std::cerr << "Offending expr: " << C << "\n"; + std::cerr << "Offending expr: " << *C << "\n"; assert(0 && "Constant expression not yet handled!\n"); } } @@ -483,7 +483,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB, } else if (ConstantPointerRef *CPR = dyn_cast(C)) { BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue()); } else { - std::cerr << "Offending constant: " << C << "\n"; + std::cerr << "Offending constant: " << *C << "\n"; assert(0 && "Type not handled yet!"); } }