diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 04:47:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 04:47:45 +0000 |
commit | 35c33bd772b3cfb34fdc6b5c9171f955454d0043 (patch) | |
tree | 763442764850298ab7321ad5b68be659d9fb60cf /lib/CodeGen | |
parent | 20adc9dc4650313f017b27d9818eb2176238113d (diff) | |
download | external_llvm-35c33bd772b3cfb34fdc6b5c9171f955454d0043.zip external_llvm-35c33bd772b3cfb34fdc6b5c9171f955454d0043.tar.gz external_llvm-35c33bd772b3cfb34fdc6b5c9171f955454d0043.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 @@ void AsmPrinter::EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) { /// 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 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const { LastMI = MI; LastFn = ThisF; } - O << Counter; + OS << Counter; } else { std::string msg; raw_string_ostream Msg(msg); @@ -1497,7 +1497,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { } std::string Val(StrStart, StrEnd); - PrintSpecial(MI, Val.c_str()); + PrintSpecial(MI, O, Val.c_str()); LastEmitted = StrEnd+1; break; } |