diff options
author | Vedant Kumar <vsk@apple.com> | 2019-12-04 10:35:14 -0800 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-12-04 10:35:14 -0800 |
commit | f208b70fbc4dee78067b3c5bd6cb92aa3ba58a1e (patch) | |
tree | c57e6e3d339fbde7061c31a19bb9613ef131be50 /clang/lib/CodeGen/CoverageMappingGen.h | |
parent | 9b15873c92832b06f41be1e1047ea5033411ee0f (diff) | |
download | bcm5719-llvm-f208b70fbc4dee78067b3c5bd6cb92aa3ba58a1e.tar.gz bcm5719-llvm-f208b70fbc4dee78067b3c5bd6cb92aa3ba58a1e.zip |
Revert "[Coverage] Revise format to reduce binary size"
This reverts commit e18531595bba495946aa52c0a16b9f9238cff8bc.
On Windows, there is an error:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/54963/steps/stage%201%20check/logs/stdio
error: C:\b\slave\sanitizer-windows\build\stage1\projects\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o: Failed to load coverage: Malformed coverage data
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.h')
-rw-r--r-- | clang/lib/CodeGen/CoverageMappingGen.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.h b/clang/lib/CodeGen/CoverageMappingGen.h index 5d79d1e6567..3bf51f59047 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.h +++ b/clang/lib/CodeGen/CoverageMappingGen.h @@ -47,27 +47,17 @@ class CodeGenModule; /// Organizes the cross-function state that is used while generating /// code coverage mapping data. class CoverageMappingModuleGen { - /// Information needed to emit a coverage record for a function. - struct FunctionInfo { - uint64_t NameHash; - uint64_t FuncHash; - std::string CoverageMapping; - bool IsUsed; - }; - CodeGenModule &CGM; CoverageSourceInfo &SourceInfo; llvm::SmallDenseMap<const FileEntry *, unsigned, 8> FileEntries; + std::vector<llvm::Constant *> FunctionRecords; std::vector<llvm::Constant *> FunctionNames; - std::vector<FunctionInfo> FunctionRecords; - - /// Emit a function record. - void emitFunctionMappingRecord(const FunctionInfo &Info, - uint64_t FilenamesRef); + llvm::StructType *FunctionRecordTy; + std::vector<std::string> CoverageMappings; public: CoverageMappingModuleGen(CodeGenModule &CGM, CoverageSourceInfo &SourceInfo) - : CGM(CGM), SourceInfo(SourceInfo) {} + : CGM(CGM), SourceInfo(SourceInfo), FunctionRecordTy(nullptr) {} CoverageSourceInfo &getSourceInfo() const { return SourceInfo; |