[CodeGen] Simplify code. No functionality change intended.

llvm-svn: 287754
This commit is contained in:
Benjamin Kramer 2016-11-23 11:20:27 +00:00
parent c3a44b2fbe
commit 630cf8c2a3
1 changed files with 1 additions and 8 deletions

View File

@ -818,14 +818,7 @@ llvm::ConstantInt *CodeGenModule::CreateCrossDsoCfiTypeId(llvm::Metadata *MD) {
llvm::MDString *MDS = dyn_cast<llvm::MDString>(MD);
if (!MDS) return nullptr;
llvm::MD5 md5;
llvm::MD5::MD5Result result;
md5.update(MDS->getString());
md5.final(result);
uint64_t id = 0;
for (int i = 0; i < 8; ++i)
id |= static_cast<uint64_t>(result[i]) << (i * 8);
return llvm::ConstantInt::get(Int64Ty, id);
return llvm::ConstantInt::get(Int64Ty, llvm::MD5Hash(MDS->getString()));
}
void CodeGenModule::setFunctionDefinitionAttributes(const FunctionDecl *D,