From 4ce15adb8c6f7d21d85c859abe3d39e7b0ac30b8 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Wed, 10 Feb 2016 17:57:08 +0000 Subject: [PATCH] [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 --- llvm/include/llvm/ProfileData/CoverageMapping.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/ProfileData/CoverageMapping.h b/llvm/include/llvm/ProfileData/CoverageMapping.h index 5d9460c..6cf4bab 100644 --- a/llvm/include/llvm/ProfileData/CoverageMapping.h +++ b/llvm/include/llvm/ProfileData/CoverageMapping.h @@ -519,7 +519,7 @@ template struct CovMapFunctionRecordV1 { } }; -template struct CovMapFunctionRecord { +struct CovMapFunctionRecord { #define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init) Type Name; #include "llvm/ProfileData/InstrProfData.inc" @@ -539,7 +539,7 @@ template struct CovMapFunctionRecord { template std::error_code getFuncName(InstrProfSymtab &ProfileNames, StringRef &FuncName) const { - IntPtrT NameRef = getFuncNameRef(); + uint64_t NameRef = getFuncNameRef(); FuncName = ProfileNames.getFuncName(NameRef); return std::error_code(); } @@ -577,7 +577,7 @@ enum CovMapVersion { }; template struct CovMapTraits { - typedef CovMapFunctionRecord CovMapFuncRecordType; + typedef CovMapFunctionRecord CovMapFuncRecordType; typedef uint64_t NameRefType; }; -- 2.7.4