diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-26 22:52:05 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-26 22:52:05 +0000 |
commit | e69170a11079504e1b20ec79296925f295dc01c0 (patch) | |
tree | 7c415eb6c14f0afb0e97e42d6ba2579dd897fb3a /llvm/lib/Object | |
parent | 11c6f6165b76a42da7eaf4514e419be397d7fc44 (diff) | |
download | bcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.tar.gz bcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.zip |
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754.
llvm-svn: 211814
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 2511a4a3faa..dbfc07270a6 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -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; } |