mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Don't allocate temporary string for section data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -229,6 +229,23 @@ struct NType {
|
||||
|
||||
}
|
||||
|
||||
void ScalarTraits<COFFYAML::BinaryRef>::output(const COFFYAML::BinaryRef &Val,
|
||||
void *, llvm::raw_ostream &Out) {
|
||||
ArrayRef<uint8_t> Data = Val.getBinary();
|
||||
for (ArrayRef<uint8_t>::iterator I = Data.begin(), E = Data.end(); I != E;
|
||||
++I) {
|
||||
uint8_t Byte = *I;
|
||||
Out << hexdigit(Byte >> 4);
|
||||
Out << hexdigit(Byte & 0xf);
|
||||
}
|
||||
}
|
||||
|
||||
StringRef ScalarTraits<COFFYAML::BinaryRef>::input(StringRef Scalar, void *,
|
||||
COFFYAML::BinaryRef &Val) {
|
||||
Val = COFFYAML::BinaryRef(Scalar);
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
void MappingTraits<COFF::relocation>::mapping(IO &IO, COFF::relocation &Rel) {
|
||||
MappingNormalization<NType, uint16_t> NT(IO, Rel.Type);
|
||||
|
||||
|
Reference in New Issue
Block a user