Remove some std stream usage from Support and TableGen

LLVM's coding standards recommend raw_ostream and MemoryBuffer for
reading and writing text.

This has the side effect of allowing clang to compile more of Support
and TableGen in the Microsoft C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2013-08-06 22:51:21 +00:00
parent 2d66d4cf42
commit 47cfec0284
4 changed files with 25 additions and 19 deletions

View File

@ -41,10 +41,10 @@ bool llvm::sys::hasDisassembler()
std::string llvm::sys::disassembleBuffer(uint8_t* start, size_t length,
uint64_t pc) {
std::stringstream res;
#if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) \
&& USE_UDIS86
std::stringstream res;
unsigned bits;
# if defined(__i386__)
bits = 32;
@ -66,9 +66,9 @@ std::string llvm::sys::disassembleBuffer(uint8_t* start, size_t length,
while (ud_disassemble(&ud_obj)) {
res << ud_insn_off(&ud_obj) << ":\t" << ud_insn_asm(&ud_obj) << "\n";
}
#else
res << "No disassembler available. See configure help for options.\n";
#endif
return res.str();
#else
return "No disassembler available. See configure help for options.\n";
#endif
}