forked from OSchip/llvm-project
[CodeGen] Simplify code. No functionality change intended.
llvm-svn: 287754
This commit is contained in:
parent
c3a44b2fbe
commit
630cf8c2a3
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue