This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Expose a easier helper function for getting names for relocation types
ClosedPublic

Authored by mstorsjo on Aug 20 2018, 1:40 PM.

Details

Summary

The existing method is protected, and requires using DataRefImpl and SmallVector.

This will be used by LLD.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk accepted this revision.Aug 20 2018, 1:56 PM

lgtm

lib/Object/COFFObjectFile.cpp
1277–1278 ↗(On Diff #161554)

Does Result += getRelocationTypeName(Reloc->Type); work?

This revision is now accepted and ready to land.Aug 20 2018, 1:56 PM
mstorsjo added inline comments.Aug 20 2018, 2:13 PM
lib/Object/COFFObjectFile.cpp
1277–1278 ↗(On Diff #161554)

No, it doesn't:

../lib/Object/COFFObjectFile.cpp:1279:10: error: no match for ‘operator+=’ (operand types are ‘llvm::SmallVectorImpl<char>’ and ‘llvm::StringRef’)
ruiu accepted this revision.Aug 22 2018, 12:35 AM

LGTM

lib/Object/COFFObjectFile.cpp
1179 ↗(On Diff #161554)

Remove the trailing backslash.

This revision was automatically updated to reflect the committed changes.