change a ton of code to not implicitly use the "O" raw_ostream
member of AsmPrinter. Instead, pass it in explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100306 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8412816..870c97e 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1330,12 +1330,12 @@
/// or other bits of target-specific knowledge into the asmstrings. The
/// syntax used is ${:comment}. Targets can override this to add support
/// for their own strange codes.
-void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const {
+void AsmPrinter::PrintSpecial(const MachineInstr *MI, raw_ostream &OS,
+ const char *Code) const {
if (!strcmp(Code, "private")) {
- O << MAI->getPrivateGlobalPrefix();
+ OS << MAI->getPrivateGlobalPrefix();
} else if (!strcmp(Code, "comment")) {
- if (VerboseAsm)
- O << MAI->getCommentString();
+ OS << MAI->getCommentString();
} else if (!strcmp(Code, "uid")) {
// Comparing the address of MI isn't sufficient, because machineinstrs may
// be allocated to the same address across functions.
@@ -1347,7 +1347,7 @@
LastMI = MI;
LastFn = ThisF;
}
- O << Counter;
+ OS << Counter;
} else {
std::string msg;
raw_string_ostream Msg(msg);
@@ -1497,7 +1497,7 @@
}
std::string Val(StrStart, StrEnd);
- PrintSpecial(MI, Val.c_str());
+ PrintSpecial(MI, O, Val.c_str());
LastEmitted = StrEnd+1;
break;
}