diff options
| author | Justin Bogner <mail@justinbogner.com> | 2015-09-02 22:46:15 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2015-09-02 22:46:15 +0000 |
| commit | 0ffea9d47f27cf519e6a13786f3cf73b285733e2 (patch) | |
| tree | 6bfb662d3e20f21621756885845e780e0ee2fb87 /llvm/lib | |
| parent | 866e0d19f4188bc8bd2f0f7dbb40a8195ee32f8b (diff) | |
| download | bcm5719-llvm-0ffea9d47f27cf519e6a13786f3cf73b285733e2.tar.gz bcm5719-llvm-0ffea9d47f27cf519e6a13786f3cf73b285733e2.zip | |
IR: Remove an unused AssemblyWriter constructor. NFC
llvm-svn: 246729
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index bc9b00e7de1..86d923e5d83 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -708,10 +708,6 @@ int ModuleSlotTracker::getLocalSlot(const Value *V) { return Machine->getLocalSlot(V); } -static SlotTracker *createSlotTracker(const Module *M) { - return new SlotTracker(M); -} - static SlotTracker *createSlotTracker(const Value *V) { if (const Argument *FA = dyn_cast<Argument>(V)) return new SlotTracker(FA->getParent()); @@ -2017,11 +2013,6 @@ public: AssemblyAnnotationWriter *AAW, bool ShouldPreserveUseListOrder = false); - /// Construct an AssemblyWriter with an internally allocated SlotTracker - AssemblyWriter(formatted_raw_ostream &o, const Module *M, - AssemblyAnnotationWriter *AAW, - bool ShouldPreserveUseListOrder = false); - void printMDNodeBody(const MDNode *MD); void printNamedMDNode(const NamedMDNode *NMD); @@ -2052,8 +2043,6 @@ public: void printUseLists(const Function *F); private: - void init(); - /// \brief Print out metadata attachments. void printMetadataAttachments( const SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs, @@ -2069,7 +2058,11 @@ private: }; } // namespace -void AssemblyWriter::init() { +AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac, + const Module *M, AssemblyAnnotationWriter *AAW, + bool ShouldPreserveUseListOrder) + : Out(o), TheModule(M), Machine(Mac), AnnotationWriter(AAW), + ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { if (!TheModule) return; TypePrinter.incorporateTypes(*TheModule); @@ -2081,23 +2074,6 @@ void AssemblyWriter::init() { Comdats.insert(C); } -AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac, - const Module *M, AssemblyAnnotationWriter *AAW, - bool ShouldPreserveUseListOrder) - : Out(o), TheModule(M), Machine(Mac), AnnotationWriter(AAW), - ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { - init(); -} - -AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, const Module *M, - AssemblyAnnotationWriter *AAW, - bool ShouldPreserveUseListOrder) - : Out(o), TheModule(M), SlotTrackerStorage(createSlotTracker(M)), - Machine(*SlotTrackerStorage), AnnotationWriter(AAW), - ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { - init(); -} - void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType) { if (!Operand) { Out << "<null operand!>"; |

