Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index b1239a2..2ae1d4f 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -35,7 +35,8 @@
: DataLayout(&M) {}
virtual bool WantsWholeFile() const { return true; }
- virtual bool addPassesToEmitWholeFile(PassManager &PM, raw_ostream &Out,
+ virtual bool addPassesToEmitWholeFile(PassManager &PM,
+ formatted_raw_ostream &Out,
CodeGenFileType FileType,
CodeGenOpt::Level OptLevel);
@@ -1702,7 +1703,8 @@
// External Interface declaration
//===----------------------------------------------------------------------===//
-bool MSILTarget::addPassesToEmitWholeFile(PassManager &PM, raw_ostream &o,
+bool MSILTarget::addPassesToEmitWholeFile(PassManager &PM,
+ formatted_raw_ostream &o,
CodeGenFileType FileType,
CodeGenOpt::Level OptLevel)
{
diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h
index ea0dfad..cbb2d31 100644
--- a/lib/Target/MSIL/MSILWriter.h
+++ b/lib/Target/MSIL/MSILWriter.h
@@ -21,8 +21,8 @@
#include "llvm/PassManager.h"
#include "llvm/Analysis/FindUsedTypes.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetMachineRegistry.h"
@@ -75,7 +75,7 @@
}
public:
- raw_ostream &Out;
+ formatted_raw_ostream &Out;
Module* ModulePtr;
const TargetData* TD;
Mangler* Mang;
@@ -85,11 +85,15 @@
StaticInitList;
const std::set<const Type *>* UsedTypes;
static char ID;
+<<<<<<< .mine
+ MSILWriter(formatted_raw_ostream &o) : FunctionPass(&ID), Out(o) {
+=======
DenseMap<const Value*, unsigned> AnonValueNumbers;
unsigned NextAnonValueNumber;
MSILWriter(raw_ostream &o)
: FunctionPass(&ID), Out(o), NextAnonValueNumber(0) {
+>>>>>>> .r75668
UniqID = 0;
}