[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 ...

llvm-svn: 212834
This commit is contained in:
Ulrich Weigand 2014-07-11 17:34:44 +00:00
parent 79e3da9653
commit 0a51abc100
2 changed files with 4 additions and 4 deletions

View File

@ -27,9 +27,9 @@ class MCELF {
static void SetType(MCSymbolData &SD, unsigned Type);
static unsigned GetType(const MCSymbolData &SD);
static void SetVisibility(MCSymbolData &SD, unsigned Visibility);
static unsigned GetVisibility(MCSymbolData &SD);
static unsigned GetVisibility(const MCSymbolData &SD);
static void setOther(MCSymbolData &SD, unsigned Other);
static unsigned getOther(MCSymbolData &SD);
static unsigned getOther(const MCSymbolData &SD);
};
}

View File

@ -61,7 +61,7 @@ void MCELF::SetVisibility(MCSymbolData &SD, unsigned Visibility) {
SD.setFlags(OtherFlags | (Visibility << ELF_STV_Shift));
}
unsigned MCELF::GetVisibility(MCSymbolData &SD) {
unsigned MCELF::GetVisibility(const MCSymbolData &SD) {
unsigned Visibility =
(SD.getFlags() & (0x3 << ELF_STV_Shift)) >> ELF_STV_Shift;
assert(Visibility == ELF::STV_DEFAULT || Visibility == ELF::STV_INTERNAL ||
@ -76,7 +76,7 @@ void MCELF::setOther(MCSymbolData &SD, unsigned Other) {
SD.setFlags(OtherFlags | (Other << ELF_STO_Shift));
}
unsigned MCELF::getOther(MCSymbolData &SD) {
unsigned MCELF::getOther(const MCSymbolData &SD) {
unsigned Other =
(SD.getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift;
return Other;