[PATCH] D50995: [COFF] Expose a easier helper function for getting names for relocation types
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 14:13:35 PDT 2018
mstorsjo added inline comments.
================
Comment at: lib/Object/COFFObjectFile.cpp:1277-1278
+ const coff_relocation *Reloc = toRel(Rel);
+ StringRef Res = getRelocationTypeName(Reloc->Type);
+ Result.append(Res.begin(), Res.end());
+}
----------------
rnk wrote:
> Does `Result += getRelocationTypeName(Reloc->Type);` work?
No, it doesn't:
```
../lib/Object/COFFObjectFile.cpp:1279:10: error: no match for ‘operator+=’ (operand types are ‘llvm::SmallVectorImpl<char>’ and ‘llvm::StringRef’)
```
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50995
More information about the llvm-commits
mailing list