[llvm] r246729 - IR: Remove an unused AssemblyWriter constructor. NFC
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 15:46:15 PDT 2015
Author: bogner
Date: Wed Sep 2 17:46:15 2015
New Revision: 246729
URL: http://llvm.org/viewvc/llvm-project?rev=246729&view=rev
Log:
IR: Remove an unused AssemblyWriter constructor. NFC
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=246729&r1=246728&r2=246729&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Wed Sep 2 17:46:15 2015
@@ -708,10 +708,6 @@ int ModuleSlotTracker::getLocalSlot(cons
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!>";
More information about the llvm-commits
mailing list