[llvm] r260393 - [PGO] coverage map bug with cov data produced for 32bit target
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 09:57:09 PST 2016
Author: davidxl
Date: Wed Feb 10 11:57:08 2016
New Revision: 260393
URL: http://llvm.org/viewvc/llvm-project?rev=260393&view=rev
Log:
[PGO] coverage map bug with cov data produced for 32bit target
Fix the result truncation bug: [PR26560]
Test case is following (compiler-rt).
Modified:
llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
Modified: llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMapping.h?rev=260393&r1=260392&r2=260393&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/CoverageMapping.h (original)
+++ llvm/trunk/include/llvm/ProfileData/CoverageMapping.h Wed Feb 10 11:57:08 2016
@@ -519,7 +519,7 @@ template <class IntPtrT> struct CovMapFu
}
};
-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 CovMapFu
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;
};
More information about the llvm-commits
mailing list