diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-04-05 23:33:25 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-04-05 23:33:25 +0000 |
| commit | b38ac1f7ee5bff721838ad41a633374d62bf66d5 (patch) | |
| tree | 840decd0ac12e93250ba4ec9dcfe9a407fdec52f /llvm/lib/IR | |
| parent | efa31a9831951de6222b65594f3c48bd36d28f9f (diff) | |
| download | bcm5719-llvm-b38ac1f7ee5bff721838ad41a633374d62bf66d5.tar.gz bcm5719-llvm-b38ac1f7ee5bff721838ad41a633374d62bf66d5.zip | |
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
llvm-svn: 205682
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index d4670e4bc6c..2c2a90bf594 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -2170,24 +2170,24 @@ void Type::print(raw_ostream &OS) const { } } -void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const { - if (this == 0) { +void Value::print(raw_ostream &ROS) const { + if (!this) { ROS << "printing a <null> value\n"; return; } formatted_raw_ostream OS(ROS); 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); - AssemblyWriter W(OS, SlotTable, getModuleFromVal(I), AAW); + AssemblyWriter W(OS, SlotTable, getModuleFromVal(I), nullptr); W.printInstruction(*I); } else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) { SlotTracker SlotTable(BB->getParent()); - AssemblyWriter W(OS, SlotTable, getModuleFromVal(BB), AAW); + AssemblyWriter W(OS, SlotTable, getModuleFromVal(BB), nullptr); W.printBasicBlock(BB); } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) { 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)) W.printGlobal(V); 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)) { const Function *F = N->getFunction(); SlotTracker SlotTable(F); - AssemblyWriter W(OS, SlotTable, F ? F->getParent() : 0, AAW); + AssemblyWriter W(OS, SlotTable, F ? F->getParent() : nullptr, nullptr); W.printMDNodeBody(N); } else if (const Constant *C = dyn_cast<Constant>(this)) { TypePrinting TypePrinter; TypePrinter.print(C->getType(), OS); OS << ' '; - WriteConstantInternal(OS, C, TypePrinter, 0, 0); + WriteConstantInternal(OS, C, TypePrinter, nullptr, nullptr); } else if (isa<InlineAsm>(this) || isa<MDString>(this) || isa<Argument>(this)) { this->printAsOperand(OS); |

