diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-11-23 11:20:27 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-11-23 11:20:27 +0000 |
commit | 630cf8c2a3c40c8713d2e4f28da55763ab7ce9d4 (patch) | |
tree | 439970fe9af7495ebfa9bbcd180fd1c7289e287c /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c3a44b2fbea997c3b814d4beace4d85f5eee524e (diff) | |
download | bcm5719-llvm-630cf8c2a3c40c8713d2e4f28da55763ab7ce9d4.tar.gz bcm5719-llvm-630cf8c2a3c40c8713d2e4f28da55763ab7ce9d4.zip |
[CodeGen] Simplify code. No functionality change intended.
llvm-svn: 287754
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 869f0097c7f..44eeaac73d1 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -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, |