summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CoverageMappingGen.h
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-01-21 19:25:35 +0000
committerVedant Kumar <vsk@apple.com>2016-01-21 19:25:35 +0000
commitca3326c0d4aecdb37f64b01f03eeacf4d6c258c6 (patch)
tree2209f9e032dc6aa4df2c8c5a8ebe635edde6afc7 /clang/lib/CodeGen/CoverageMappingGen.h
parent950af1558f8e8e9f7b3ec10bb954a59545f87e18 (diff)
downloadbcm5719-llvm-ca3326c0d4aecdb37f64b01f03eeacf4d6c258c6.tar.gz
bcm5719-llvm-ca3326c0d4aecdb37f64b01f03eeacf4d6c258c6.zip
[Coverage] Reduce complexity of adding function mapping records
Replace a string append operation in addFunctionMappingRecord with a vector append. The existing behavior is quadratic in the worst case: this patch makes it linear. Differential Revision: http://reviews.llvm.org/D16395 llvm-svn: 258424
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.h')
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.h b/clang/lib/CodeGen/CoverageMappingGen.h
index 70aed842924..c202fe89934 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.h
+++ b/clang/lib/CodeGen/CoverageMappingGen.h
@@ -56,7 +56,7 @@ class CoverageMappingModuleGen {
std::vector<llvm::Constant *> FunctionRecords;
std::vector<llvm::Constant *> FunctionNames;
llvm::StructType *FunctionRecordTy;
- std::string CoverageMappings;
+ std::vector<std::string> CoverageMappings;
public:
CoverageMappingModuleGen(CodeGenModule &CGM, CoverageSourceInfo &SourceInfo)
OpenPOWER on IntegriCloud