[llvm] r290041 - [DWARF] - Make PubIndexEntryDescriptor::toBits() to be const.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 17 02:15:40 PST 2016
Author: grimar
Date: Sat Dec 17 04:15:39 2016
New Revision: 290041
URL: http://llvm.org/viewvc/llvm-project?rev=290041&view=rev
Log:
[DWARF] - Make PubIndexEntryDescriptor::toBits() to be const.
That is usefull when iterating over entries of new DWARFDebugPubTable class
via DWARFDebugPubTable::getData which returns ArrayRef.
Modified:
llvm/trunk/include/llvm/Support/Dwarf.h
Modified: llvm/trunk/include/llvm/Support/Dwarf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=290041&r1=290040&r2=290041&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Dwarf.h (original)
+++ llvm/trunk/include/llvm/Support/Dwarf.h Sat Dec 17 04:15:39 2016
@@ -423,7 +423,9 @@ struct PubIndexEntryDescriptor {
KIND_OFFSET)),
Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
LINKAGE_OFFSET)) {}
- uint8_t toBits() { return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET; }
+ uint8_t toBits() const {
+ return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET;
+ }
private:
enum {
More information about the llvm-commits
mailing list