[PATCH] D81185: [ELF] Adding accessor method for getting Note Desc as StringRef
Saiyedul Islam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 03:13:57 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcb6885b295ed: [ELF] Adding accessor method for getting Note Desc as StringRef (authored by dineshkb-amd, committed by saiislam).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81185/new/
https://reviews.llvm.org/D81185
Files:
llvm/include/llvm/Object/ELFTypes.h
Index: llvm/include/llvm/Object/ELFTypes.h
===================================================================
--- llvm/include/llvm/Object/ELFTypes.h
+++ llvm/include/llvm/Object/ELFTypes.h
@@ -615,6 +615,12 @@
Nhdr.n_descsz);
}
+ /// Get the note's descriptor as StringRef
+ StringRef getDescAsStringRef() const {
+ auto &Desc = getDesc();
+ return StringRef(reinterpret_cast<const char *>(Desc.data()), Desc.size());
+ }
+
/// Get the note's type.
Elf_Word getType() const { return Nhdr.n_type; }
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81185.269145.patch
Type: text/x-patch
Size: 533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200608/f78944a9/attachment.bin>
More information about the llvm-commits
mailing list