File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,10 @@ namespace {
104104 llvm::SmallVectorImpl<char >& Buf,
105105 AdditionalArgList& Args,
106106 bool Verbose) {
107- std::string CppInclQuery (" LC_ALL=C " );
108- CppInclQuery.append (Compiler);
109- CppInclQuery.append (" -xc++ -E -v /dev/null 2>&1 >/dev/null "
110- " | awk '/^#include </,/^End of search"
111- " /{if (!/^#include </ && !/^End of search/){ print }}' "
112- " | GREP_OPTIONS= grep -E \" (c|g)\\ +\\ +\" " );
107+ std::string CppInclQuery (Compiler);
108+
109+ CppInclQuery.append (" -xc++ -E -v /dev/null 2>&1 |"
110+ " sed -n -e '/^.include/,${' -e '/^ \\ /.*++/p' -e '}'" );
113111
114112 if (Verbose)
115113 cling::log () << " Looking for C++ headers with:\n " << CppInclQuery << " \n " ;
Original file line number Diff line number Diff line change @@ -252,8 +252,7 @@ if (UNIX)
252252
253253 execute_process (
254254 COMMAND echo ${CLING_CXX_HEADERS}
255- COMMAND awk "/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}"
256- COMMAND grep -E "(c|g)\\ +\\ +"
255+ COMMAND sed -n -e /^.include /,\$\{ -e /^\\\ \\\/.*++/p -e \}
257256 OUTPUT_VARIABLE CLING_CXX_HEADERS)
258257
259258 stripNewLine("${CLING_CXX_HEADERS} " CLING_CXX_HEADERS)
You can’t perform that action at this time.
0 commit comments