mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-03 11:24:18 +00:00
Remove unused parameter
Also update a few null pointers in this function to be consistent with new null pointers being added. Patch by Robert Matusewicz! Differential Revision: http://reviews.llvm.org/D3123 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
/// print - Implement operator<< on Value.
|
/// print - Implement operator<< on Value.
|
||||||
///
|
///
|
||||||
void print(raw_ostream &O, AssemblyAnnotationWriter *AAW = 0) const;
|
void print(raw_ostream &O) const;
|
||||||
|
|
||||||
/// \brief Print the name of this Value out to the specified raw_ostream.
|
/// \brief Print the name of this Value out to the specified raw_ostream.
|
||||||
/// This is useful when you just want to print 'int %reg126', not the
|
/// This is useful when you just want to print 'int %reg126', not the
|
||||||
|
@ -2170,24 +2170,24 @@ void Type::print(raw_ostream &OS) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
|
void Value::print(raw_ostream &ROS) const {
|
||||||
if (this == 0) {
|
if (!this) {
|
||||||
ROS << "printing a <null> value\n";
|
ROS << "printing a <null> value\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
formatted_raw_ostream OS(ROS);
|
formatted_raw_ostream OS(ROS);
|
||||||
if (const Instruction *I = dyn_cast<Instruction>(this)) {
|
if (const Instruction *I = dyn_cast<Instruction>(this)) {
|
||||||
const Function *F = I->getParent() ? I->getParent()->getParent() : 0;
|
const Function *F = I->getParent() ? I->getParent()->getParent() : nullptr;
|
||||||
SlotTracker SlotTable(F);
|
SlotTracker SlotTable(F);
|
||||||
AssemblyWriter W(OS, SlotTable, getModuleFromVal(I), AAW);
|
AssemblyWriter W(OS, SlotTable, getModuleFromVal(I), nullptr);
|
||||||
W.printInstruction(*I);
|
W.printInstruction(*I);
|
||||||
} else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) {
|
} else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) {
|
||||||
SlotTracker SlotTable(BB->getParent());
|
SlotTracker SlotTable(BB->getParent());
|
||||||
AssemblyWriter W(OS, SlotTable, getModuleFromVal(BB), AAW);
|
AssemblyWriter W(OS, SlotTable, getModuleFromVal(BB), nullptr);
|
||||||
W.printBasicBlock(BB);
|
W.printBasicBlock(BB);
|
||||||
} else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
|
} else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
|
||||||
SlotTracker SlotTable(GV->getParent());
|
SlotTracker SlotTable(GV->getParent());
|
||||||
AssemblyWriter W(OS, SlotTable, GV->getParent(), AAW);
|
AssemblyWriter W(OS, SlotTable, GV->getParent(), nullptr);
|
||||||
if (const GlobalVariable *V = dyn_cast<GlobalVariable>(GV))
|
if (const GlobalVariable *V = dyn_cast<GlobalVariable>(GV))
|
||||||
W.printGlobal(V);
|
W.printGlobal(V);
|
||||||
else if (const Function *F = dyn_cast<Function>(GV))
|
else if (const Function *F = dyn_cast<Function>(GV))
|
||||||
@ -2197,13 +2197,13 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
|
|||||||
} else if (const MDNode *N = dyn_cast<MDNode>(this)) {
|
} else if (const MDNode *N = dyn_cast<MDNode>(this)) {
|
||||||
const Function *F = N->getFunction();
|
const Function *F = N->getFunction();
|
||||||
SlotTracker SlotTable(F);
|
SlotTracker SlotTable(F);
|
||||||
AssemblyWriter W(OS, SlotTable, F ? F->getParent() : 0, AAW);
|
AssemblyWriter W(OS, SlotTable, F ? F->getParent() : nullptr, nullptr);
|
||||||
W.printMDNodeBody(N);
|
W.printMDNodeBody(N);
|
||||||
} else if (const Constant *C = dyn_cast<Constant>(this)) {
|
} else if (const Constant *C = dyn_cast<Constant>(this)) {
|
||||||
TypePrinting TypePrinter;
|
TypePrinting TypePrinter;
|
||||||
TypePrinter.print(C->getType(), OS);
|
TypePrinter.print(C->getType(), OS);
|
||||||
OS << ' ';
|
OS << ' ';
|
||||||
WriteConstantInternal(OS, C, TypePrinter, 0, 0);
|
WriteConstantInternal(OS, C, TypePrinter, nullptr, nullptr);
|
||||||
} else if (isa<InlineAsm>(this) || isa<MDString>(this) ||
|
} else if (isa<InlineAsm>(this) || isa<MDString>(this) ||
|
||||||
isa<Argument>(this)) {
|
isa<Argument>(this)) {
|
||||||
this->printAsOperand(OS);
|
this->printAsOperand(OS);
|
||||||
|
Reference in New Issue
Block a user