[llvm] e63a3b4 - Add cast to appease clang-armv7-linux-build-cache (D69471 followup)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 18:28:03 PST 2020
Author: Vedant Kumar
Date: 2020-02-28T18:27:06-08:00
New Revision: e63a3b445ac032d0b6fe7d3d1e1d8be7f9cb310b
URL: https://github.com/llvm/llvm-project/commit/e63a3b445ac032d0b6fe7d3d1e1d8be7f9cb310b
DIFF: https://github.com/llvm/llvm-project/commit/e63a3b445ac032d0b6fe7d3d1e1d8be7f9cb310b.diff
LOG: Add cast to appease clang-armv7-linux-build-cache (D69471 followup)
http://lab.llvm.org:8011/builders/clang-armv7-linux-build-cache/builds/27075
error: non-constant-expression cannot be narrowed from type 'uint64_t'
(aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in
initializer list [-Wc++11-narrowing]
return {MappingBuf, getDataSize<FuncRecordTy, Endian>(Record)};
Added:
Modified:
llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
index f48d26ae4aaf..f96ec0ae1bfe 100644
--- a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
@@ -743,7 +743,7 @@ Error getFuncNameViaRef(const FuncRecordTy *Record,
template <class FuncRecordTy, support::endianness Endian>
StringRef getCoverageMappingOutOfLine(const FuncRecordTy *Record,
const char *MappingBuf) {
- return {MappingBuf, getDataSize<FuncRecordTy, Endian>(Record)};
+ return {MappingBuf, size_t(getDataSize<FuncRecordTy, Endian>(Record))};
}
/// Advance to the next out-of-line coverage mapping and its associated
More information about the llvm-commits
mailing list