diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-04 20:43:49 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-04 20:43:49 -0400 |
| commit | b5d07297dec61a3993dfe91ceee2c87672db1e8e (patch) | |
| tree | 519d097fcdfe121e38814a080868a85f5b1f9e64 /src/analyze.cpp | |
| parent | 9665cfe027c70a84cb6351ea6ecb833a728736aa (diff) | |
| parent | 8c39cdc89f2ae7fc25c3856e7c4c6b4662ac8a80 (diff) | |
| download | zig-b5d07297dec61a3993dfe91ceee2c87672db1e8e.tar.gz zig-b5d07297dec61a3993dfe91ceee2c87672db1e8e.zip | |
Merge remote-tracking branch 'origin/master' into llvm7
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 6f94deb9fd..ca582dfc4c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -4417,22 +4417,14 @@ Buf *get_linux_libc_include_path(void) { } char *prev_newline = buf_ptr(out_stderr); ZigList<const char *> search_paths = {}; - bool found_search_paths = false; for (;;) { char *newline = strchr(prev_newline, '\n'); if (newline == nullptr) { - zig_panic("unable to determine libc include path: bad output from C compiler command"); + break; } *newline = 0; - if (found_search_paths) { - if (strcmp(prev_newline, "End of search list.") == 0) { - break; - } + if (prev_newline[0] == ' ') { search_paths.append(prev_newline); - } else { - if (strcmp(prev_newline, "#include <...> search starts here:") == 0) { - found_search_paths = true; - } } prev_newline = newline + 1; } |
