r287754 - [CodeGen] Simplify code. No functionality change intended.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 23 03:20:28 PST 2016
Author: d0k
Date: Wed Nov 23 05:20:27 2016
New Revision: 287754
URL: http://llvm.org/viewvc/llvm-project?rev=287754&view=rev
Log:
[CodeGen] Simplify code. No functionality change intended.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=287754&r1=287753&r2=287754&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Nov 23 05:20:27 2016
@@ -818,14 +818,7 @@ llvm::ConstantInt *CodeGenModule::Create
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,
More information about the cfe-commits
mailing list