llvm.org GIT mirror llvm / c345ba8
[MC] Constify MCELF::GetVisibility and MCELF::getOther These two routines didn't take a "const MCSymbolData &SD" like the other MCELF::Get routines for some reason ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212834 91177308-0d34-0410-b5e6-96231b3b80d8 Ulrich Weigand 5 years ago
2 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2626 static void SetType(MCSymbolData &SD, unsigned Type);
2727 static unsigned GetType(const MCSymbolData &SD);
2828 static void SetVisibility(MCSymbolData &SD, unsigned Visibility);
29 static unsigned GetVisibility(MCSymbolData &SD);
29 static unsigned GetVisibility(const MCSymbolData &SD);
3030 static void setOther(MCSymbolData &SD, unsigned Other);
31 static unsigned getOther(MCSymbolData &SD);
31 static unsigned getOther(const MCSymbolData &SD);
3232 };
3333
3434 }
6060 SD.setFlags(OtherFlags | (Visibility << ELF_STV_Shift));
6161 }
6262
63 unsigned MCELF::GetVisibility(MCSymbolData &SD) {
63 unsigned MCELF::GetVisibility(const MCSymbolData &SD) {
6464 unsigned Visibility =
6565 (SD.getFlags() & (0x3 << ELF_STV_Shift)) >> ELF_STV_Shift;
6666 assert(Visibility == ELF::STV_DEFAULT || Visibility == ELF::STV_INTERNAL ||
7575 SD.setFlags(OtherFlags | (Other << ELF_STO_Shift));
7676 }
7777
78 unsigned MCELF::getOther(MCSymbolData &SD) {
78 unsigned MCELF::getOther(const MCSymbolData &SD) {
7979 unsigned Other =
8080 (SD.getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift;
8181 return Other;