本文整理汇总了C++中llvm::hash_combine方法的典型用法代码示例。如果您正苦于以下问题:C++ llvm::hash_combine方法的具体用法?C++ llvm::hash_combine怎么用?C++ llvm::hash_combine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llvm
的用法示例。
在下文中一共展示了llvm::hash_combine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSignature
uint64_t ExternalCommand::getSignature() {
// FIXME: Use a more appropriate hashing infrastructure.
using llvm::hash_combine;
llvm::hash_code code = hash_value(getName());
for (const auto* input: inputs) {
code = hash_combine(code, input->getName());
}
for (const auto* output: outputs) {
code = hash_combine(code, output->getName());
}
code = hash_combine(code, allowMissingInputs);
code = hash_combine(code, allowModifiedOutputs);
code = hash_combine(code, alwaysOutOfDate);
return size_t(code);
}
示例2: getPCHHash
std::string CompilerInvocation::getPCHHash() const {
using llvm::hash_code;
using llvm::hash_value;
using llvm::hash_combine;
auto Code = hash_value(LangOpts.getPCHHashComponents());
Code = hash_combine(Code, FrontendOpts.getPCHHashComponents());
Code = hash_combine(Code, ClangImporterOpts.getPCHHashComponents());
Code = hash_combine(Code, SearchPathOpts.getPCHHashComponents());
Code = hash_combine(Code, DiagnosticOpts.getPCHHashComponents());
Code = hash_combine(Code, SILOpts.getPCHHashComponents());
Code = hash_combine(Code, IRGenOpts.getPCHHashComponents());
return llvm::APInt(64, Code).toString(36, /*Signed=*/false);
}