SwitchInst cosmetics: renamed "Hash" method to "hash"

llvm-svn: 156757
This commit is contained in:
Stepan Dyatkovskiy 2012-05-14 08:26:31 +00:00
parent c3fd480203
commit 3dea421826
3 changed files with 3 additions and 3 deletions

View File

@ -2733,7 +2733,7 @@ public:
setOperand(idx*2+1, (Value*)NewSucc);
}
uint16_t Hash() const {
uint16_t hash() const {
uint32_t NumberOfCases = (uint32_t)getNumCases();
uint16_t Hash = (0xFFFF & NumberOfCases) ^ (NumberOfCases >> 16);
for (ConstCaseIt i = case_begin(), e = case_end();

View File

@ -2280,7 +2280,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
ConstantRangesSet Case = CaseBuilder.getCase();
SI->addCase(Case, DestBB);
}
uint16_t Hash = SI->Hash();
uint16_t Hash = SI->hash();
if (Hash != (Record[0] & 0xFFFF))
return Error("Invalid SWITCH record");
I = SI;

View File

@ -1159,7 +1159,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
Code = bitc::FUNC_CODE_INST_SWITCH;
SwitchInst &SI = cast<SwitchInst>(I);
uint32_t SwitchRecordHeader = SI.Hash() | (SWITCH_INST_MAGIC << 16);
uint32_t SwitchRecordHeader = SI.hash() | (SWITCH_INST_MAGIC << 16);
Vals64.push_back(SwitchRecordHeader);
Vals64.push_back(VE.getTypeID(SI.getCondition()->getType()));