summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2016-07-04 13:34:11 +0000
committerEric Liu <ioeric@google.com>2016-07-04 13:34:11 +0000
commitbb112521133fab7fec58d306a5ff2bc539e2b8d5 (patch)
tree9e8b9622bbcca611417c56537d0bbf1fc2aed37b
parentc662533d0509e574a76926226bea7d667172fa9e (diff)
downloadbcm5719-llvm-bb112521133fab7fec58d306a5ff2bc539e2b8d5.tar.gz
bcm5719-llvm-bb112521133fab7fec58d306a5ff2bc539e2b8d5.zip
[include-fixer] reduce stack size by changing RegexHeaderMap to use const char * pair.
llvm-svn: 274501
-rw-r--r--clang-tools-extra/include-fixer/find-all-symbols/HeaderMapCollector.h3
-rw-r--r--clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/clang-tools-extra/include-fixer/find-all-symbols/HeaderMapCollector.h b/clang-tools-extra/include-fixer/find-all-symbols/HeaderMapCollector.h
index ecbd25f8329..c8ba2a8944c 100644
--- a/clang-tools-extra/include-fixer/find-all-symbols/HeaderMapCollector.h
+++ b/clang-tools-extra/include-fixer/find-all-symbols/HeaderMapCollector.h
@@ -23,8 +23,7 @@ namespace find_all_symbols {
class HeaderMapCollector {
public:
typedef llvm::StringMap<std::string> HeaderMap;
- typedef std::vector<std::pair<llvm::StringRef, llvm::StringRef>>
- RegexHeaderMap;
+ typedef std::vector<std::pair<const char *, const char *>> RegexHeaderMap;
HeaderMapCollector() : RegexHeaderMappingTable(nullptr) {}
diff --git a/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp b/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
index c074b858840..baa5dca463f 100644
--- a/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
+++ b/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
@@ -74,7 +74,7 @@ public:
std::string IncHeaderCode = "class IncHeaderClass {};";
HeaderMapCollector::RegexHeaderMap RegexMap = {
- {R"(internal_.*\.h$)", TopHeader},
+ {R"(internal_.*\.h$)", TopHeader.c_str()},
};
std::string InternalCode =
OpenPOWER on IntegriCloud