summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-02-10 17:57:08 +0000
committerXinliang David Li <davidxl@google.com>2016-02-10 17:57:08 +0000
commit4ce15adb8c6f7d21d85c859abe3d39e7b0ac30b8 (patch)
tree93ae64985fd431993562aaa233e506a935427aff
parent5e005a110862db0ad974862593d6e9541ce8cf8e (diff)
downloadbcm5719-llvm-4ce15adb8c6f7d21d85c859abe3d39e7b0ac30b8.tar.gz
bcm5719-llvm-4ce15adb8c6f7d21d85c859abe3d39e7b0ac30b8.zip
[PGO] coverage map bug with cov data produced for 32bit target
Fix the result truncation bug: [PR26560] Test case is following (compiler-rt). llvm-svn: 260393
-rw-r--r--llvm/include/llvm/ProfileData/CoverageMapping.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/ProfileData/CoverageMapping.h b/llvm/include/llvm/ProfileData/CoverageMapping.h
index 5d9460ce69c..6cf4bab19db 100644
--- a/llvm/include/llvm/ProfileData/CoverageMapping.h
+++ b/llvm/include/llvm/ProfileData/CoverageMapping.h
@@ -519,7 +519,7 @@ template <class IntPtrT> struct CovMapFunctionRecordV1 {
}
};
-template <class IntPtrT> struct CovMapFunctionRecord {
+struct CovMapFunctionRecord {
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init) Type Name;
#include "llvm/ProfileData/InstrProfData.inc"
@@ -539,7 +539,7 @@ template <class IntPtrT> struct CovMapFunctionRecord {
template <support::endianness Endian>
std::error_code getFuncName(InstrProfSymtab &ProfileNames,
StringRef &FuncName) const {
- IntPtrT NameRef = getFuncNameRef<Endian>();
+ uint64_t NameRef = getFuncNameRef<Endian>();
FuncName = ProfileNames.getFuncName(NameRef);
return std::error_code();
}
@@ -577,7 +577,7 @@ enum CovMapVersion {
};
template <int CovMapVersion, class IntPtrT> struct CovMapTraits {
- typedef CovMapFunctionRecord<IntPtrT> CovMapFuncRecordType;
+ typedef CovMapFunctionRecord CovMapFuncRecordType;
typedef uint64_t NameRefType;
};
OpenPOWER on IntegriCloud