mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -301,7 +301,7 @@ static unsigned getCPUType(const MachOObjectFile *O) {
|
||||
|
||||
static void printRelocationTargetName(const MachOObjectFile *O,
|
||||
const MachO::any_relocation_info &RE,
|
||||
raw_ostream &fmt) {
|
||||
raw_string_ostream &fmt) {
|
||||
bool IsScattered = O->isRelocationScattered(RE);
|
||||
|
||||
// Target of a scattered relocation is an address. In the interest of
|
||||
@@ -1010,7 +1010,8 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
||||
|
||||
unsigned Arch = this->getArch();
|
||||
|
||||
string_ostream fmt;
|
||||
std::string fmtbuf;
|
||||
raw_string_ostream fmt(fmtbuf);
|
||||
unsigned Type = this->getAnyRelocationType(RE);
|
||||
bool IsPCRel = this->getAnyRelocationPCRel(RE);
|
||||
|
||||
@@ -1173,7 +1174,7 @@ MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
|
||||
} else
|
||||
printRelocationTargetName(this, RE, fmt);
|
||||
|
||||
StringRef fmtbuf = fmt.str();
|
||||
fmt.flush();
|
||||
Result.append(fmtbuf.begin(), fmtbuf.end());
|
||||
return object_error::success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user