From owner-svn-src-vendor@freebsd.org Sun Jun 25 22:19:03 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55D4ED9B7B7; Sun, 25 Jun 2017 22:19:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC157FBC7; Sun, 25 Jun 2017 22:19:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PMJ2j6044067; Sun, 25 Jun 2017 22:19:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PMJ2HO044064; Sun, 25 Jun 2017 22:19:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706252219.v5PMJ2HO044064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Jun 2017 22:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320341 - in vendor/elftoolchain/dist: elfdump libelftc test/cxxfilt test/cxxfilt/ts test/cxxfilt/ts/builtin test/cxxfilt/ts/misc test/cxxfilt/ts/qualifiers test/cxxfilt/ts/substitute t... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 22:19:03 -0000 Author: emaste Date: Sun Jun 25 22:19:01 2017 New Revision: 320341 URL: https://svnweb.freebsd.org/changeset/base/320341 Log: Import ELF Tool Chain snapshot at r3561 From http://svn.code.sf.net/p/elftoolchain/code Added: vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/ vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/builtin/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/ vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/qualifiers/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/ vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/substitute/tclist vendor/elftoolchain/dist/test/cxxfilt/ts/template/ vendor/elftoolchain/dist/test/cxxfilt/ts/template/Makefile (contents, props changed) vendor/elftoolchain/dist/test/cxxfilt/ts/template/tclist vendor/elftoolchain/dist/test/elfcopy/plugin/os.FreeBSD.mk (contents, props changed) Modified: vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/libelftc/_libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/libelftc/libelftc_vstr.c vendor/elftoolchain/dist/test/cxxfilt/tet_scen vendor/elftoolchain/dist/test/cxxfilt/ts/Makefile vendor/elftoolchain/dist/test/cxxfilt/ts/misc/tclist Modified: vendor/elftoolchain/dist/elfdump/elfdump.c ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.c Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/elfdump/elfdump.c Sun Jun 25 22:19:01 2017 (r320341) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3497 2016-10-17 20:57:22Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -2226,8 +2226,8 @@ elf_print_svr4_hash64(struct elfdump *ed, struct secti uint64_t *buf; uint64_t *bucket, *chain; uint64_t nbucket, nchain; - uint64_t *bl, *c, maxl, total; - uint64_t i, j; + uint64_t *bl, *c, j, maxl, total; + size_t i; int elferr, first; char idx[10]; Modified: vendor/elftoolchain/dist/libelftc/_libelftc.h ============================================================================== --- vendor/elftoolchain/dist/libelftc/_libelftc.h Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/libelftc/_libelftc.h Sun Jun 25 22:19:01 2017 (r320341) @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: _libelftc.h 3174 2015-03-27 17:13:41Z emaste $ + * $Id: _libelftc.h 3531 2017-06-05 05:08:43Z kaiwang27 $ */ #ifndef __LIBELFTC_H_ @@ -82,6 +82,8 @@ bool vector_str_init(struct vector_str *_vs); bool vector_str_pop(struct vector_str *_vs); bool vector_str_push(struct vector_str *_vs, const char *_str, size_t _len); +bool vector_str_push_vector(struct vector_str *_dst, + struct vector_str *_org); bool vector_str_push_vector_head(struct vector_str *_dst, struct vector_str *_org); char *vector_str_substr(const struct vector_str *_vs, size_t _begin, Modified: vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c ============================================================================== --- vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Sun Jun 25 21:53:08 2017 (r320340) +++ vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c Sun Jun 25 22:19:01 2017 (r320341) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2007 Hyogeol Lee + * Copyright (c) 2015-2017 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +37,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 07:04:19Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3560 2017-06-25 00:28:23Z kaiwang27 $"); /** * @file cpp_demangle.c @@ -50,7 +51,7 @@ ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3512 2016-12-29 enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST, TYPE_VEC + TYPE_CST, TYPE_VEC, TYPE_RREF }; struct vector_type_qualifier { @@ -64,29 +65,49 @@ enum read_cmd { READ_TYPE, READ_FUNC, READ_PTRMEM }; +struct read_cmd_item { + enum read_cmd cmd; + void *data; +}; + struct vector_read_cmd { size_t size, capacity; - enum read_cmd *r_container; + struct read_cmd_item *r_container; }; +enum push_qualifier { + PUSH_ALL_QUALIFIER, + PUSH_CV_QUALIFIER, + PUSH_NON_CV_QUALIFIER, +}; + struct cpp_demangle_data { struct vector_str output; /* output string vector */ - struct vector_str output_tmp; struct vector_str subst; /* substitution string vector */ struct vector_str tmpl; struct vector_str class_type; + struct vector_str *cur_output; /* ptr to current output vec */ struct vector_read_cmd cmd; - bool paren; /* parenthesis opened */ - bool pfirst; /* first element of parameter */ bool mem_rst; /* restrict member function */ bool mem_vat; /* volatile member function */ bool mem_cst; /* const member function */ + bool mem_ref; /* lvalue-ref member func */ + bool mem_rref; /* rvalue-ref member func */ + bool is_tmpl; /* template args */ + bool is_functype; /* function type */ + bool ref_qualifier; /* ref qualifier */ + enum type_qualifier ref_qualifier_type; /* ref qualifier type */ + enum push_qualifier push_qualifier; /* which qualifiers to push */ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ - int push_head; }; +struct type_delimit { + bool paren; + bool firstp; +}; + #define CPP_DEMANGLE_TRY_LIMIT 128 #define FLOAT_SPRINTF_TRY_LIMIT 5 #define FLOAT_QUADRUPLE_BYTES 16 @@ -105,6 +126,7 @@ static int cpp_demangle_push_fp(struct cpp_demangle_da char *(*)(const char *, size_t)); static int cpp_demangle_push_str(struct cpp_demangle_data *, const char *, size_t); +static int cpp_demangle_pop_str(struct cpp_demangle_data *); static int cpp_demangle_push_subst(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_push_subst_v(struct cpp_demangle_data *, @@ -137,16 +159,18 @@ static int cpp_demangle_read_number_as_string(struct c static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); -static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *); +static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *, + struct vector_type_qualifier *); static int cpp_demangle_read_sname(struct cpp_demangle_data *); static int cpp_demangle_read_subst(struct cpp_demangle_data *); static int cpp_demangle_read_subst_std(struct cpp_demangle_data *); static int cpp_demangle_read_subst_stdtmpl(struct cpp_demangle_data *, - const char *, size_t); + const char *); static int cpp_demangle_read_tmpl_arg(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); -static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type(struct cpp_demangle_data *, + struct type_delimit *); static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); @@ -158,10 +182,12 @@ static char *decode_fp_to_float80(const char *, size_t static char *decode_fp_to_long_double(const char *, size_t); static int hex_to_dec(char); static void vector_read_cmd_dest(struct vector_read_cmd *); -static int vector_read_cmd_find(struct vector_read_cmd *, enum read_cmd); +static struct read_cmd_item *vector_read_cmd_find(struct vector_read_cmd *, + enum read_cmd); static int vector_read_cmd_init(struct vector_read_cmd *); static int vector_read_cmd_pop(struct vector_read_cmd *); -static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd); +static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd, + void *); static void vector_type_qualifier_dest(struct vector_type_qualifier *); static int vector_type_qualifier_init(struct vector_type_qualifier *); static int vector_type_qualifier_push(struct vector_type_qualifier *, @@ -178,9 +204,12 @@ char * cpp_demangle_gnu3(const char *org) { struct cpp_demangle_data ddata; + struct vector_str ret_type; + struct type_delimit td; ssize_t org_len; unsigned int limit; char *rtn; + bool has_ret, more_type; if (org == NULL || (org_len = strlen(org)) < 2) return (NULL); @@ -200,26 +229,75 @@ cpp_demangle_gnu3(const char *org) return (NULL); rtn = NULL; + has_ret = more_type = false; if (!cpp_demangle_read_encoding(&ddata)) goto clean; + /* + * Pop function name from substitution candidate list. + */ + if (*ddata.cur != 0 && ddata.subst.size >= 1) { + if (!vector_str_pop(&ddata.subst)) + goto clean; + } + + td.paren = false; + td.firstp = true; limit = 0; + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata.is_tmpl) { + ddata.is_tmpl = false; + if (!vector_str_init(&ret_type)) + goto clean; + ddata.cur_output = &ret_type; + has_ret = true; + } + while (*ddata.cur != '\0') { /* * Breaking at some gcc info at tail. e.g) @@GLIBCXX_3.4 */ if (*ddata.cur == '@' && *(ddata.cur + 1) == '@') break; - if (!cpp_demangle_read_type(&ddata, 1)) - goto clean; + + if (has_ret) { + /* Read return type */ + if (!cpp_demangle_read_type(&ddata, NULL)) + goto clean; + } else { + /* Read function arg type */ + if (!cpp_demangle_read_type(&ddata, &td)) + goto clean; + } + + if (has_ret) { + /* Push return type to the beginning */ + if (!VEC_PUSH_STR(&ret_type, " ")) + goto clean; + if (!vector_str_push_vector_head(&ddata.output, + &ret_type)) + goto clean; + ddata.cur_output = &ddata.output; + vector_str_dest(&ret_type); + has_ret = false; + more_type = true; + } else if (more_type) + more_type = false; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) goto clean; } + if (more_type) + goto clean; if (ddata.output.size == 0) goto clean; - if (ddata.paren && !VEC_PUSH_STR(&ddata.output, ")")) + if (td.paren && !VEC_PUSH_STR(&ddata.output, ")")) goto clean; if (ddata.mem_vat && !VEC_PUSH_STR(&ddata.output, " volatile")) goto clean; @@ -227,10 +305,17 @@ cpp_demangle_gnu3(const char *org) goto clean; if (ddata.mem_rst && !VEC_PUSH_STR(&ddata.output, " restrict")) goto clean; + if (ddata.mem_ref && !VEC_PUSH_STR(&ddata.output, " &")) + goto clean; + if (ddata.mem_rref && !VEC_PUSH_STR(&ddata.output, " &&")) + goto clean; rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); clean: + if (has_ret) + vector_str_dest(&ret_type); + cpp_demangle_data_dest(&ddata); return (rtn); @@ -247,7 +332,6 @@ cpp_demangle_data_dest(struct cpp_demangle_data *d) vector_str_dest(&d->class_type); vector_str_dest(&d->tmpl); vector_str_dest(&d->subst); - vector_str_dest(&d->output_tmp); vector_str_dest(&d->output); } @@ -260,43 +344,42 @@ cpp_demangle_data_init(struct cpp_demangle_data *d, co if (!vector_str_init(&d->output)) return (0); - if (!vector_str_init(&d->output_tmp)) - goto clean1; if (!vector_str_init(&d->subst)) - goto clean2; + goto clean1; if (!vector_str_init(&d->tmpl)) - goto clean3; + goto clean2; if (!vector_str_init(&d->class_type)) - goto clean4; + goto clean3; if (!vector_read_cmd_init(&d->cmd)) - goto clean5; + goto clean4; assert(d->output.container != NULL); - assert(d->output_tmp.container != NULL); assert(d->subst.container != NULL); assert(d->tmpl.container != NULL); assert(d->class_type.container != NULL); - d->paren = false; - d->pfirst = false; d->mem_rst = false; d->mem_vat = false; d->mem_cst = false; + d->mem_ref = false; + d->mem_rref = false; + d->is_tmpl = false; + d->is_functype = false; + d->ref_qualifier = false; + d->push_qualifier = PUSH_ALL_QUALIFIER; d->func_type = 0; d->cur = cur; + d->cur_output = &d->output; d->last_sname = NULL; - d->push_head = 0; return (1); -clean5: - vector_str_dest(&d->class_type); clean4: - vector_str_dest(&d->tmpl); + vector_str_dest(&d->class_type); clean3: - vector_str_dest(&d->subst); + vector_str_dest(&d->tmpl); clean2: - vector_str_dest(&d->output_tmp); + vector_str_dest(&d->subst); clean1: vector_str_dest(&d->output); @@ -341,13 +424,27 @@ cpp_demangle_push_str(struct cpp_demangle_data *ddata, if (ddata == NULL || str == NULL || len == 0) return (0); - if (ddata->push_head > 0) - return (vector_str_push(&ddata->output_tmp, str, len)); + /* + * is_tmpl is used to check if the type (function arg) is right next + * to template args, and should always be cleared whenever new string + * pushed. + */ + ddata->is_tmpl = false; - return (vector_str_push(&ddata->output, str, len)); + return (vector_str_push(ddata->cur_output, str, len)); } static int +cpp_demangle_pop_str(struct cpp_demangle_data *ddata) +{ + + if (ddata == NULL) + return (0); + + return (vector_str_pop(ddata->cur_output)); +} + +static int cpp_demangle_push_subst(struct cpp_demangle_data *ddata, const char *str, size_t len) { @@ -386,9 +483,11 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d struct vector_type_qualifier *v, const char *type_str) { struct vector_str subst_v; + enum type_qualifier t; size_t idx, e_idx, e_len; - int rtn; char *buf; + int rtn; + bool cv; if (ddata == NULL || v == NULL) return (0); @@ -404,10 +503,14 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d goto clean; } + cv = true; e_idx = 0; while (idx > 0) { switch (v->q_container[idx - 1]) { case TYPE_PTR: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "*")) goto clean; if (type_str != NULL) { @@ -420,6 +523,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_REF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, "&")) goto clean; if (type_str != NULL) { @@ -431,7 +537,25 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d } break; + case TYPE_RREF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&&")) + goto clean; + if (type_str != NULL) { + if (!VEC_PUSH_STR(&subst_v, "&&")) + goto clean; + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) + goto clean; + } + break; + case TYPE_CMX: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " complex")) goto clean; if (type_str != NULL) { @@ -444,6 +568,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_IMG: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { @@ -457,6 +584,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_EXT: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -489,11 +619,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_RST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " restrict")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " restrict")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -501,11 +642,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VAT: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " volatile")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " volatile")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -513,11 +665,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_CST: + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; if (!DEM_PUSH_STR(ddata, " const")) goto clean; if (type_str != NULL) { if (!VEC_PUSH_STR(&subst_v, " const")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -525,6 +688,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VEC: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -614,7 +780,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[]")) @@ -630,7 +796,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat assert(num_len > 0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!DEM_PUSH_STR(ddata, "[")) return (0); @@ -660,7 +826,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat free(exp); return (0); } - if (!cpp_demangle_read_type(ddata, 0)) { + if (!cpp_demangle_read_type(ddata, NULL)) { free(exp); return (0); } @@ -777,11 +943,11 @@ cpp_demangle_read_expression(struct cpp_demangle_data switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('s', 't'): ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('s', 'r'): ddata->cur += 2; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!cpp_demangle_read_uqname(ddata)) return (0); @@ -1058,8 +1224,7 @@ cpp_demangle_read_expression_flat(struct cpp_demangle_ size_t i, p_idx, idx, exp_len; char *exp; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = &ddata->output; p_idx = output->size; @@ -1136,8 +1301,12 @@ static int cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, struct vector_type_qualifier *v) { + struct type_delimit td; + struct read_cmd_item *rc; size_t class_type_size, class_type_len, limit; const char *class_type; + int i; + bool paren, non_cv_qualifier; if (ddata == NULL || *ddata->cur != 'F' || v == NULL) return (0); @@ -1148,12 +1317,43 @@ cpp_demangle_read_function(struct cpp_demangle_data *d *ext_c = 1; ++ddata->cur; } - if (!cpp_demangle_read_type(ddata, 0)) + + /* Return type */ + if (!cpp_demangle_read_type(ddata, NULL)) return (0); + if (*ddata->cur != 'E') { - if (!DEM_PUSH_STR(ddata, "(")) + if (!DEM_PUSH_STR(ddata, " ")) return (0); - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM)) { + + non_cv_qualifier = false; + if (v->size > 0) { + for (i = 0; (size_t) i < v->size; i++) { + if (v->q_container[i] != TYPE_RST && + v->q_container[i] != TYPE_VAT && + v->q_container[i] != TYPE_CST) { + non_cv_qualifier = true; + break; + } + } + } + + paren = false; + rc = vector_read_cmd_find(&ddata->cmd, READ_PTRMEM); + if (non_cv_qualifier || rc != NULL) { + if (!DEM_PUSH_STR(ddata, "(")) + return (0); + paren = true; + } + + /* Push non-cv qualifiers. */ + ddata->push_qualifier = PUSH_NON_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) + return (0); + + if (rc) { + if (non_cv_qualifier && !DEM_PUSH_STR(ddata, " ")) + return (0); if ((class_type_size = ddata->class_type.size) == 0) return (0); class_type = @@ -1167,40 +1367,67 @@ cpp_demangle_read_function(struct cpp_demangle_data *d return (0); if (!DEM_PUSH_STR(ddata, "::*")) return (0); + /* Push pointer-to-member qualifiers. */ + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, rc->data, + NULL)) + return (0); ++ddata->func_type; - } else { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + } + + if (paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + paren = false; } - if (!DEM_PUSH_STR(ddata, ")(")) - return (0); - + td.paren = false; + td.firstp = true; limit = 0; + ddata->is_functype = true; for (;;) { - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, &td)) return (0); if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } - - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM) == 1) { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + ddata->is_functype = false; + if (td.paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + td.paren = false; } - if (!DEM_PUSH_STR(ddata, ")")) + /* Push CV qualifiers. */ + ddata->push_qualifier = PUSH_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) return (0); + + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + + /* Release type qualifier vector. */ + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + + /* Push ref-qualifiers. */ + if (ddata->ref_qualifier) { + switch (ddata->ref_qualifier_type) { + case TYPE_REF: + if (!DEM_PUSH_STR(ddata, " &")) + return (0); + break; + case TYPE_RREF: + if (!DEM_PUSH_STR(ddata, " &&")) + return (0); + break; + default: + return (0); + } + ddata->ref_qualifier = false; + } } ++ddata->cur; @@ -1306,7 +1533,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d goto clean3; if (*ddata->cur++ != '_') goto clean3; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (!DEM_PUSH_STR(ddata, "-in-")) goto clean3; @@ -1328,7 +1555,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'h'): /* virtual function non-virtual override thunk */ @@ -1358,7 +1585,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'J'): /* java class */ @@ -1367,7 +1594,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'S'): /* RTTI name (NTBS) */ @@ -1376,7 +1603,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'T'): /* VTT table */ @@ -1385,7 +1612,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'v'): /* virtual function virtual override thunk */ @@ -1406,7 +1633,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d ddata->cur += 2; if (*ddata->cur == '\0') return (0); - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('T', 'W'): /* TLS wrapper function */ @@ -1424,30 +1651,74 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d static int cpp_demangle_read_local_name(struct cpp_demangle_data *ddata) { + struct vector_str local_name; + struct type_delimit td; size_t limit; + bool more_type; if (ddata == NULL) return (0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_encoding(ddata)) + + vector_str_init(&local_name); + ddata->cur_output = &local_name; + + if (!cpp_demangle_read_encoding(ddata)) { + vector_str_dest(&local_name); return (0); + } + ddata->cur_output = &ddata->output; + + td.paren = false; + td.firstp = true; + more_type = false; limit = 0; - for (;;) { - if (!cpp_demangle_read_type(ddata, 1)) + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata->is_tmpl) { + ddata->is_tmpl = false; + + /* Read return type */ + if (!cpp_demangle_read_type(ddata, NULL)) { + vector_str_dest(&local_name); return (0); + } + + more_type = true; + } + + /* Now we can push the name after possible return type is handled. */ + if (!vector_str_push_vector(&ddata->output, &local_name)) { + vector_str_dest(&local_name); + return (0); + } + vector_str_dest(&local_name); + + while (*ddata->cur != '\0') { + if (!cpp_demangle_read_type(ddata, &td)) + return (0); + if (more_type) + more_type = false; if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } + if (more_type) + return (0); + if (*(++ddata->cur) == '\0') return (0); - if (ddata->paren == true) { + if (td.paren == true) { if (!DEM_PUSH_STR(ddata, ")")) return (0); - ddata->paren = false; + td.paren = false; } if (*ddata->cur == 's') ++ddata->cur; @@ -1477,7 +1748,7 @@ cpp_demangle_read_name(struct cpp_demangle_data *ddata if (ddata == NULL || *ddata->cur == '\0') return (0); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; + output = ddata->cur_output; subst_str = NULL; @@ -1539,8 +1810,7 @@ cpp_demangle_read_name_flat(struct cpp_demangle_data * size_t i, p_idx, idx, name_len; char *name; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = ddata->cur_output; p_idx = output->size; @@ -1577,8 +1847,7 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (*(++ddata->cur) == '\0') return (0); - while (*ddata->cur == 'r' || *ddata->cur == 'V' || - *ddata->cur == 'K') { + do { switch (*ddata->cur) { case 'r': ddata->mem_rst = true; @@ -1589,11 +1858,19 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data case 'K': ddata->mem_cst = true; break; + case 'R': + ddata->mem_ref = true; + break; + case 'O': + ddata->mem_rref = true; + break; + default: + goto next; } - ++ddata->cur; - } + } while (*(++ddata->cur)); - output = ddata->push_head > 0 ? &ddata->output_tmp : &ddata->output; +next: + output = ddata->cur_output; if (!vector_str_init(&v)) return (0); @@ -1619,6 +1896,8 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data goto clean; } + if (p_idx == output->size) + goto next_comp; if ((subst_str = vector_str_substr(output, p_idx, output->size - 1, &subst_str_len)) == NULL) goto clean; @@ -1630,10 +1909,12 @@ cpp_demangle_read_nested_name(struct cpp_demangle_data if (!cpp_demangle_push_subst_v(ddata, &v)) goto clean; + + next_comp: if (*ddata->cur == 'E') break; - else if (*ddata->cur != 'I' && - *ddata->cur != 'C' && *ddata->cur != 'D') { + else if (*ddata->cur != 'I' && *ddata->cur != 'C' && + *ddata->cur != 'D' && p_idx != output->size) { if (!DEM_PUSH_STR(ddata, "::")) goto clean; if (!VEC_PUSH_STR(&v, "::")) @@ -1776,7 +2057,8 @@ cpp_demangle_read_offset_number(struct cpp_demangle_da } static int -cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata) +cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *ddata, + struct vector_type_qualifier *v) { size_t class_type_len, i, idx, p_idx; int p_func_type, rtn; @@ -1786,7 +2068,7 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl return (0); p_idx = ddata->output.size; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if ((class_type = vector_str_substr(&ddata->output, p_idx, @@ -1799,14 +2081,14 @@ cpp_demangle_read_pointer_to_member(struct cpp_demangl if (!vector_str_pop(&ddata->output)) goto clean1; - if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM)) + if (!vector_read_cmd_push(&ddata->cmd, READ_PTRMEM, v)) goto clean1; if (!vector_str_push(&ddata->class_type, class_type, class_type_len)) goto clean2; p_func_type = ddata->func_type; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) goto clean3; if (p_func_type == ddata->func_type) { @@ -1828,6 +2110,10 @@ clean2: clean1: free(class_type); + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + return (rtn); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sun Jun 25 22:19:35 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 876A9D9B805; Sun, 25 Jun 2017 22:19:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CAE87FCE6; Sun, 25 Jun 2017 22:19:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5PMJYhl044129; Sun, 25 Jun 2017 22:19:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5PMJYD6044128; Sun, 25 Jun 2017 22:19:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706252219.v5PMJYD6044128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Jun 2017 22:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320342 - vendor/elftoolchain/elftoolchain-r3561 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2017 22:19:35 -0000 Author: emaste Date: Sun Jun 25 22:19:34 2017 New Revision: 320342 URL: https://svnweb.freebsd.org/changeset/base/320342 Log: Tag ELF Tool Chain r3561 Added: vendor/elftoolchain/elftoolchain-r3561/ - copied from r320341, vendor/elftoolchain/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:32:57 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00B71D911B0; Mon, 26 Jun 2017 20:32:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 375A364C01; Mon, 26 Jun 2017 20:32:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKWthN098657; Mon, 26 Jun 2017 20:32:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKWrTp098634; Mon, 26 Jun 2017 20:32:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262032.v5QKWrTp098634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320374 - in vendor/llvm/dist: . cmake/modules docs docs/Proposals examples/Kaleidoscope/BuildingAJIT/Chapter1 examples/Kaleidoscope/BuildingAJIT/Chapter2 examples/Kaleidoscope/Building... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:32:57 -0000 Author: dim Date: Mon Jun 26 20:32:52 2017 New Revision: 320374 URL: https://svnweb.freebsd.org/changeset/base/320374 Log: Vendor import of llvm trunk r306325: https://llvm.org/svn/llvm-project/llvm/trunk@306325 Added: vendor/llvm/dist/include/llvm/CodeGen/MacroFusion.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeName.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/Solaris/ vendor/llvm/dist/include/llvm/Support/Solaris/sys/ vendor/llvm/dist/include/llvm/Support/Solaris/sys/regset.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/MacroFusion.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeName.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCWinCOFFStreamer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64CondBrTuning.cpp (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMMacroFusion.cpp (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMMacroFusion.h (contents, props changed) vendor/llvm/dist/test/Analysis/BasicAA/fallback-mayalias.ll vendor/llvm/dist/test/Analysis/CostModel/X86/interleaved-load-i8.ll vendor/llvm/dist/test/Analysis/CostModel/X86/interleaved-store-i8.ll vendor/llvm/dist/test/CodeGen/AArch64/atomic-ops-lse.ll vendor/llvm/dist/test/CodeGen/AArch64/cond-br-tuning.ll vendor/llvm/dist/test/CodeGen/AArch64/mergestores_noimplicitfloat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir vendor/llvm/dist/test/CodeGen/AMDGPU/callee-frame-setup.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-cond-add-sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fold-operands-order.mir vendor/llvm/dist/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.hsa.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.load.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/opt-sgpr-to-vgpr-copy.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-gfx9.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-vop2-64bit.mir vendor/llvm/dist/test/CodeGen/AMDGPU/shrink-carry.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select-cmp.mir vendor/llvm/dist/test/CodeGen/ARM/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/ARM/v6m-umul-with-overflow.ll vendor/llvm/dist/test/CodeGen/Hexagon/duplex-addi-global-imm.mir vendor/llvm/dist/test/CodeGen/Hexagon/expand-condsets-imm.mir vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill1.mir vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill3.mir vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump-kill.ll vendor/llvm/dist/test/CodeGen/Hexagon/stack-align-reset.ll vendor/llvm/dist/test/CodeGen/Hexagon/store-imm-large-stack.ll vendor/llvm/dist/test/CodeGen/Hexagon/vec-vararg-align.ll vendor/llvm/dist/test/CodeGen/MSP430/struct_layout.ll vendor/llvm/dist/test/CodeGen/PowerPC/licm-remat.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcpy_dereferenceable.ll vendor/llvm/dist/test/CodeGen/SPARC/constructor.ll vendor/llvm/dist/test/CodeGen/SystemZ/frame-21.ll vendor/llvm/dist/test/CodeGen/SystemZ/int-cmp-54.ll vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-neon-deprecated.mir vendor/llvm/dist/test/CodeGen/WebAssembly/offset-fastisel.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-insert-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-insert-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-extract-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-extract-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-insert-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-insert-vec512.mir vendor/llvm/dist/test/CodeGen/X86/avx512-vec3-crash.ll vendor/llvm/dist/test/CodeGen/X86/combine-pmuldq.ll vendor/llvm/dist/test/CodeGen/X86/merge-consecutive-stores.ll vendor/llvm/dist/test/CodeGen/X86/non-value-mem-operand.mir vendor/llvm/dist/test/CodeGen/X86/pr15705.ll vendor/llvm/dist/test/CodeGen/X86/pr15981.ll vendor/llvm/dist/test/CodeGen/X86/pr33396.ll vendor/llvm/dist/test/CodeGen/X86/sbb.ll vendor/llvm/dist/test/CodeGen/X86/stack-probe-red-zone.ll vendor/llvm/dist/test/CodeGen/X86/stack-probes.ll vendor/llvm/dist/test/DebugInfo/MIR/AArch64/implicit-def-dead-scope.mir vendor/llvm/dist/test/DebugInfo/PDB/dbi-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/module-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-bytes.test vendor/llvm/dist/test/DebugInfo/PDB/tpi-bytes.test vendor/llvm/dist/test/DebugInfo/X86/partial-constant.ll vendor/llvm/dist/test/MC/AMDGPU/flat-global.s (contents, props changed) vendor/llvm/dist/test/MC/AMDGPU/mtbuf.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-beq-fixup.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/cross-section-relative-err.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/secrel32-undef.s (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/AMDGPU/gfx9_dasm_all.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/AMDGPU/mtbuf_vi.txt (contents, props changed) vendor/llvm/dist/test/MC/Hexagon/duplex-addi-global-imm.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-rdata.s (contents, props changed) vendor/llvm/dist/test/MC/WebAssembly/stack-ptr.ll vendor/llvm/dist/test/ObjectYAML/wasm/weak_symbols.yaml vendor/llvm/dist/test/Transforms/GVN/PRE/phi-translate-2.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/huge_muls.ll vendor/llvm/dist/test/Transforms/Inline/inline-probe-stack.ll vendor/llvm/dist/test/Transforms/Inline/inline-stack-probe-size.ll vendor/llvm/dist/test/Transforms/InstCombine/compare-3way.ll vendor/llvm/dist/test/Transforms/InstCombine/early_constfold_changes_IR.ll vendor/llvm/dist/test/Transforms/InstCombine/early_dce_clobbers_callgraph.ll vendor/llvm/dist/test/Transforms/InstCombine/pr33453.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/X86/interleavedStore.ll vendor/llvm/dist/test/Transforms/LICM/strlen.ll vendor/llvm/dist/test/Transforms/LoopRotate/catchret.ll (contents, props changed) vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/bin_power.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AMDGPU/packed-math.ll vendor/llvm/dist/test/Transforms/LoopVectorize/tripcount.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33461.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo_exit_merge.ll vendor/llvm/dist/test/Transforms/PGOProfile/counter_promo_mexits.ll vendor/llvm/dist/test/Transforms/PGOProfile/memop_size_from_strlen.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AMDGPU/packed-math.ll vendor/llvm/dist/test/Transforms/SROA/non-integral-pointers.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify_buckets.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/Inputs/Strip-ST.dylib.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/dyldinfo.test vendor/llvm/dist/test/tools/llvm-nm/wasm/weak-symbols.yaml vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/kextbundle.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/macho-kextbundle.test vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/kextbundle.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-disassembly-kextbundle.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-data-end.exe (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-x64.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/coff-load-config-x86.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/coff-load-config.test vendor/llvm/dist/test/tools/obj2yaml/ vendor/llvm/dist/test/tools/obj2yaml/invalid_input_file.test vendor/llvm/dist/tools/llvm-pdbutil/BytesOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/BytesOutputStyle.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.h (contents, props changed) vendor/llvm/dist/unittests/Analysis/AliasSetTrackerTest.cpp (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h vendor/llvm/dist/include/llvm/Support/Solaris.h vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabaseVisitor.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill.mir vendor/llvm/dist/test/CodeGen/SystemZ/serialize-01.ll vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-neon.ll vendor/llvm/dist/test/CodeGen/X86/2012-12-06-python27-miscompile.ll vendor/llvm/dist/test/MC/COFF/secidx-diagnostic.s vendor/llvm/dist/test/Transforms/LoadCombine/deadcode.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-aa.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-assume.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-negativegep.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AMDGPU/simplebb.ll vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.h vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.cpp vendor/llvm/dist/tools/llvm-pdbutil/CompactTypeDumpVisitor.h vendor/llvm/dist/tools/llvm-pdbutil/RawOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbutil/RawOutputStyle.h Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/TableGen.cmake vendor/llvm/dist/docs/AMDGPUUsage.rst vendor/llvm/dist/docs/GetElementPtr.rst vendor/llvm/dist/docs/GoldPlugin.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst vendor/llvm/dist/docs/XRay.rst vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h vendor/llvm/dist/include/llvm-c/OrcBindings.h vendor/llvm/dist/include/llvm/ADT/APFloat.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h vendor/llvm/dist/include/llvm/Analysis/Loads.h vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/BinaryFormat/COFF.h vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.h vendor/llvm/dist/include/llvm/BinaryFormat/MachO.h vendor/llvm/dist/include/llvm/BinaryFormat/Wasm.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/InstructionSelector.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Legalizer.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Utils.h vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfoImpls.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/EnumTables.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableCollection.h vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MSFBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MSFCommon.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MappedBlockStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/DIA/DIASession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/InfoStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBFile.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h vendor/llvm/dist/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h vendor/llvm/dist/include/llvm/DebugInfo/Symbolize/Symbolize.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/GenericValue.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITEventListener.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITSymbol.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/CompileUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/LambdaResolver.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcABISupport.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/Attributes.td vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/ConstantRange.h vendor/llvm/dist/include/llvm/IR/DerivedUser.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist/include/llvm/IR/IntrinsicsX86.td vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCFragment.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSymbolWasm.h vendor/llvm/dist/include/llvm/MC/MCValue.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFObjectWriter.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/IRSymtab.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/Object/WindowsResource.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/Option/OptParser.td vendor/llvm/dist/include/llvm/Option/OptTable.h vendor/llvm/dist/include/llvm/Option/Option.h vendor/llvm/dist/include/llvm/ProfileData/Coverage/CoverageMapping.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfReader.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfWriter.h vendor/llvm/dist/include/llvm/ProfileData/SampleProf.h vendor/llvm/dist/include/llvm/ProfileData/SampleProfReader.h vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h vendor/llvm/dist/include/llvm/Support/BinaryStreamRef.h vendor/llvm/dist/include/llvm/Support/CachePruning.h vendor/llvm/dist/include/llvm/Support/DataExtractor.h vendor/llvm/dist/include/llvm/Support/Errno.h vendor/llvm/dist/include/llvm/Support/Error.h vendor/llvm/dist/include/llvm/Support/GCOV.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/Host.h vendor/llvm/dist/include/llvm/Support/Path.h vendor/llvm/dist/include/llvm/Support/TargetRegistry.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/TableGen/Main.h vendor/llvm/dist/include/llvm/Target/GenericOpcodes.td vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.def vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Testing/Support/Error.h vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/include/llvm/Transforms/InstrProfiling.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVN.h vendor/llvm/dist/include/llvm/Transforms/Scalar/Reassociate.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/OrderedInstructions.h vendor/llvm/dist/include/llvm/Transforms/Vectorize/LoopVectorize.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/AssumptionCache.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CFLSteensAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/DemandedBits.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/BinaryFormat/Magic.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelector.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Legalizer.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerInfo.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Utils.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.h vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfoImpls.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/RegisterUsageInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/TargetSubtargetInfo.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MSFBuilder.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MSFCommon.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MappedBlockStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/DIA/DIASession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/InfoStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeSession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFile.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcCBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcCBindingsStack.h vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/IR/AsmWriter.cpp vendor/llvm/dist/lib/IR/AttributeImpl.h vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/AutoUpgrade.cpp vendor/llvm/dist/lib/IR/BasicBlock.cpp vendor/llvm/dist/lib/IR/ConstantRange.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Statepoint.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCFragment.cpp vendor/llvm/dist/lib/MC/MCSection.cpp vendor/llvm/dist/lib/MC/MCWasmStreamer.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/IRSymtab.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/Option/OptTable.cpp vendor/llvm/dist/lib/Option/Option.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMappingReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/ProfileData/InstrProfReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProfWriter.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp vendor/llvm/dist/lib/Support/CachePruning.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/DataExtractor.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/Host.inc vendor/llvm/dist/lib/Support/Unix/Memory.inc vendor/llvm/dist/lib/Support/Unix/Program.inc vendor/llvm/dist/lib/Support/Windows/Host.inc vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/Support/YAMLTraits.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64.h vendor/llvm/dist/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrAtomics.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MacroFusion.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MacroFusion.h vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SchedA57.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorDetails.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedKryoDetails.td vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/CMakeLists.txt vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/BUFInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h vendor/llvm/dist/lib/Target/AMDGPU/FLATInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/AMDGPU/Processors.td vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIDefines.h vendor/llvm/dist/lib/Target/AMDGPU/SIFixSGPRCopies.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIShrinkInstructions.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP2Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPCInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPInstructions.td vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonExpandCondsets.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonGenMux.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonNewValueJump.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPeephole.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp vendor/llvm/dist/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h vendor/llvm/dist/lib/Target/Mips/Mips32r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.h vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZFrameLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZMachineScheduler.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMachineScheduler.h vendor/llvm/dist/lib/Target/SystemZ/SystemZOperators.td vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h vendor/llvm/dist/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFastISel.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86InterleavedAccess.cpp vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MacroFusion.cpp vendor/llvm/dist/lib/Target/X86/X86MacroFusion.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.h vendor/llvm/dist/lib/Testing/Support/LLVMBuild.txt vendor/llvm/dist/lib/ToolDrivers/llvm-lib/LibDriver.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/IPO/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PGOInstrumentation.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll vendor/llvm/dist/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll vendor/llvm/dist/test/Analysis/BasicAA/bug.23540.ll vendor/llvm/dist/test/Analysis/BasicAA/bug.23626.ll vendor/llvm/dist/test/Analysis/BasicAA/constant-over-index.ll vendor/llvm/dist/test/Analysis/BasicAA/q.bad.ll vendor/llvm/dist/test/Analysis/BasicAA/returned.ll vendor/llvm/dist/test/Analysis/BasicAA/sequential-gep.ll vendor/llvm/dist/test/Analysis/BasicAA/struct-geps.ll vendor/llvm/dist/test/Analysis/BasicAA/zext.ll vendor/llvm/dist/test/Analysis/CostModel/X86/arith.ll vendor/llvm/dist/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/no-regclass.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-bitcast.mir vendor/llvm/dist/test/CodeGen/AArch64/arm64-early-ifcvt.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-neon-copy.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-shrink-v1i64.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-shrink-wrapping.ll vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.ll vendor/llvm/dist/test/CodeGen/AArch64/ldst-opt.mir vendor/llvm/dist/test/CodeGen/AArch64/misched-fusion.ll vendor/llvm/dist/test/CodeGen/AArch64/reg-scavenge-frame.mir vendor/llvm/dist/test/CodeGen/AArch64/stack-guard-remat-bitcast.ll vendor/llvm/dist/test/CodeGen/AArch64/swiftself-scavenger.ll vendor/llvm/dist/test/CodeGen/AArch64/tbz-tbnz.ll vendor/llvm/dist/test/CodeGen/AArch64/thread-pointer.ll vendor/llvm/dist/test/CodeGen/AArch64/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/AArch64/xray-tail-call-sled.ll vendor/llvm/dist/test/CodeGen/AMDGPU/attr-amdgpu-num-sgpr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-relaxation.ll vendor/llvm/dist/test/CodeGen/AMDGPU/code-object-metadata-kernel-debug-props.ll vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fpext.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/frame-index-elimination.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.qsad.pk.u16.u8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.rint.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-store-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-store-usedef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mubuf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scheduler-subrange-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-scalar-ops.mir vendor/llvm/dist/test/CodeGen/AMDGPU/si-triv-disjoint-mem-access.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-m0.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/ARM/2012-08-30-select.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-isel.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir vendor/llvm/dist/test/CodeGen/ARM/alloca-align.ll vendor/llvm/dist/test/CodeGen/ARM/constantfp.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-big-stack-frame.ll vendor/llvm/dist/test/CodeGen/ARM/fpoffset_overflow.mir vendor/llvm/dist/test/CodeGen/ARM/vector-promotion.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/Generic/llc-start-stop.ll vendor/llvm/dist/test/CodeGen/Generic/print-machineinstrs.ll vendor/llvm/dist/test/CodeGen/Hexagon/mux-kill2.mir vendor/llvm/dist/test/CodeGen/MSP430/Inst16mm.ll vendor/llvm/dist/test/CodeGen/Mips/dins.ll vendor/llvm/dist/test/CodeGen/Mips/emergency-spill-slot-near-fp.ll vendor/llvm/dist/test/CodeGen/Mips/longbranch.ll vendor/llvm/dist/test/CodeGen/Mips/msa/3r_splat.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-12-saveCR.ll vendor/llvm/dist/test/CodeGen/PowerPC/complex-return.ll vendor/llvm/dist/test/CodeGen/PowerPC/dyn-alloca-aligned.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/scavenging.mir vendor/llvm/dist/test/CodeGen/PowerPC/vsx-spill.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx.ll vendor/llvm/dist/test/CodeGen/SystemZ/trap-02.ll vendor/llvm/dist/test/CodeGen/Thumb/large-stack.ll vendor/llvm/dist/test/CodeGen/WebAssembly/byval.ll vendor/llvm/dist/test/CodeGen/WebAssembly/reg-stackify.ll vendor/llvm/dist/test/CodeGen/WebAssembly/stack-alignment.ll vendor/llvm/dist/test/CodeGen/WebAssembly/userstack.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-11-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/add-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/callingconv.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/ext.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-add-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar-x32.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar-x32.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-scalar.mir vendor/llvm/dist/test/CodeGen/X86/MergeConsecutiveStores.ll vendor/llvm/dist/test/CodeGen/X86/atom-fixup-lea3.ll vendor/llvm/dist/test/CodeGen/X86/avg.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/avx-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx-vperm2x128.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx2-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vbroadcast.ll vendor/llvm/dist/test/CodeGen/X86/avx512-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512-round.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-logic.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-i256.ll vendor/llvm/dist/test/CodeGen/X86/clear_upper_vector_element_bits.ll vendor/llvm/dist/test/CodeGen/X86/constructor.ll vendor/llvm/dist/test/CodeGen/X86/extract-store.ll vendor/llvm/dist/test/CodeGen/X86/full-lsr.ll vendor/llvm/dist/test/CodeGen/X86/hoist-spill.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-checks.mir vendor/llvm/dist/test/CodeGen/X86/insertelement-zero.ll vendor/llvm/dist/test/CodeGen/X86/insertps-combine.ll vendor/llvm/dist/test/CodeGen/X86/jump_sign.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/machine-cse.ll vendor/llvm/dist/test/CodeGen/X86/madd.ll vendor/llvm/dist/test/CodeGen/X86/masked-iv-safe.ll vendor/llvm/dist/test/CodeGen/X86/masked_gather_scatter.ll vendor/llvm/dist/test/CodeGen/X86/memcmp.ll vendor/llvm/dist/test/CodeGen/X86/scavenger.mir vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/shuffle-vs-trunc-128.ll vendor/llvm/dist/test/CodeGen/X86/shuffle-vs-trunc-256.ll vendor/llvm/dist/test/CodeGen/X86/splat-for-size.ll vendor/llvm/dist/test/CodeGen/X86/sse-scalar-fp-arith.ll vendor/llvm/dist/test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/sse2.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/vec_ctbits.ll vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll vendor/llvm/dist/test/CodeGen/X86/vector-interleave.ll vendor/llvm/dist/test/CodeGen/X86/vector-merge-store-fp-constants.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v2.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v32.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-masked.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-sse1.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v1.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v48.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-zmov.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-3.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-4.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-5.ll vendor/llvm/dist/test/CodeGen/X86/widen_arith-6.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-3.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-4.ll vendor/llvm/dist/test/CodeGen/X86/widen_conv-1.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/CodeGen/X86/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/X86/xray-custom-log.ll vendor/llvm/dist/test/CodeGen/X86/xray-log-args.ll vendor/llvm/dist/test/CodeGen/X86/xray-tail-call-sled.ll vendor/llvm/dist/test/DebugInfo/COFF/globals.ll vendor/llvm/dist/test/DebugInfo/Generic/sugared-constants.ll vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.s vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-str-offsets.x86_64.o vendor/llvm/dist/test/DebugInfo/MIR/X86/bit-piece-dh.mir vendor/llvm/dist/test/DebugInfo/PDB/pdb-yaml-symbols.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergeids.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-blocks.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-raw-stream.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-readwrite.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-types.test vendor/llvm/dist/test/DebugInfo/X86/dbg-merge-loc-entry.ll vendor/llvm/dist/test/DebugInfo/X86/inlined-formal-parameter.ll vendor/llvm/dist/test/DebugInfo/X86/parameters.ll vendor/llvm/dist/test/DebugInfo/X86/pieces-3.ll vendor/llvm/dist/test/DebugInfo/X86/reference-argument.ll vendor/llvm/dist/test/DebugInfo/X86/this-stack_value.ll vendor/llvm/dist/test/DebugInfo/dwarfdump-str-offsets.test vendor/llvm/dist/test/MC/AArch64/label-arithmetic-diags-darwin.s vendor/llvm/dist/test/MC/AMDGPU/gfx7_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/gfx8_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/gfx9_asm_all.s vendor/llvm/dist/test/MC/AMDGPU/regression/bug28168.s vendor/llvm/dist/test/MC/AMDGPU/vop3-errs.s vendor/llvm/dist/test/MC/AMDGPU/vop3.s vendor/llvm/dist/test/MC/ARM/basic-thumb2-instructions.s vendor/llvm/dist/test/MC/ARM/elf-movt.s vendor/llvm/dist/test/MC/ARM/thumb-branches.s vendor/llvm/dist/test/MC/AsmParser/negativ_altmacro_expression.s vendor/llvm/dist/test/MC/COFF/bad-expr.s vendor/llvm/dist/test/MC/COFF/cross-section-relative.s vendor/llvm/dist/test/MC/COFF/diff.s vendor/llvm/dist/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt vendor/llvm/dist/test/MC/ELF/bad-expr.s vendor/llvm/dist/test/MC/ELF/bad-expr2.s vendor/llvm/dist/test/MC/Mips/mips-register-names-o32.s vendor/llvm/dist/test/MC/Mips/mips32r6/valid.s vendor/llvm/dist/test/MC/Mips/mips64-register-names-n32-n64.s vendor/llvm/dist/test/MC/Mips/mips64-register-names-o32.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/WebAssembly/func-address.ll vendor/llvm/dist/test/MC/X86/macho-reloc-errors-x86_64.s vendor/llvm/dist/test/Object/obj2yaml.test vendor/llvm/dist/test/ObjectYAML/wasm/header_invalid_version.yaml vendor/llvm/dist/test/TableGen/GlobalISelEmitter.td vendor/llvm/dist/test/Transforms/CodeGenPrepare/X86/memcmp.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/add.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-gep-load.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-load.ll vendor/llvm/dist/test/Transforms/InferFunctionAttrs/annotate.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/switch.ll vendor/llvm/dist/test/Transforms/InstCombine/add.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-not.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-bigendian.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast.ll vendor/llvm/dist/test/Transforms/InstCombine/ctpop.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-xor-signbit.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll vendor/llvm/dist/test/Transforms/InstCombine/memcpy-from-global.ll vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/phi-select-constant.ll vendor/llvm/dist/test/Transforms/InstCombine/select-with-bitwise-ops.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InstCombine/set.ll vendor/llvm/dist/test/Transforms/InstCombine/xor2.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll vendor/llvm/dist/test/Transforms/LoopDeletion/unreachable-loops.ll vendor/llvm/dist/test/Transforms/LoopSimplify/basictest.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/canonical.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-expand-quadratic.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-insns-2.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/nested-loop.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches-Threshold.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/small-size.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/export-icall.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-ReassociateVector.ll vendor/llvm/dist/test/Transforms/Reassociate/xor_reassoc.ll vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/einline.prof vendor/llvm/dist/test/Transforms/SampleProfile/early-inline.ll vendor/llvm/dist/test/Transforms/TailCallElim/reorder_load.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_buckets.s vendor/llvm/dist/test/tools/llvm-nm/wasm/exports.yaml vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-info-plist.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-objc-meta-data.test vendor/llvm/dist/test/tools/llvm-objdump/macho-exports-trie.test vendor/llvm/dist/tools/bugpoint/CMakeLists.txt vendor/llvm/dist/tools/bugpoint/LLVMBuild.txt vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/lli/OrcLazyJIT.cpp vendor/llvm/dist/tools/lli/OrcLazyJIT.h vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.cpp vendor/llvm/dist/tools/llvm-dwp/llvm-dwp.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-pdbutil/Analyze.cpp vendor/llvm/dist/tools/llvm-pdbutil/CMakeLists.txt vendor/llvm/dist/tools/llvm-pdbutil/Diff.cpp vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.cpp vendor/llvm/dist/tools/llvm-pdbutil/LinePrinter.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.h vendor/llvm/dist/tools/llvm-profdata/llvm-profdata.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/ObjDumper.h vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.cpp vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/obj2yaml/obj2yaml.cpp vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist/unittests/ADT/StringExtrasTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/BinaryFormat/TestFileMagic.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp vendor/llvm/dist/unittests/DebugInfo/PDB/PDBApiTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/LazyEmittingLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/OrcTestCommon.h vendor/llvm/dist/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp vendor/llvm/dist/unittests/Option/OptionParsingTest.cpp vendor/llvm/dist/unittests/ProfileData/CoverageMappingTest.cpp vendor/llvm/dist/unittests/ProfileData/InstrProfTest.cpp vendor/llvm/dist/unittests/Support/CachePruningTest.cpp vendor/llvm/dist/unittests/Support/CommandLineTest.cpp vendor/llvm/dist/unittests/Support/ErrorTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/opt-viewer/opt-stats.py vendor/llvm/dist/utils/opt-viewer/opt-viewer.py vendor/llvm/dist/utils/opt-viewer/optrecord.py vendor/llvm/dist/utils/release/test-release.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CMakeLists.txt Mon Jun 26 20:32:52 2017 (r320374) @@ -94,7 +94,7 @@ if(CMAKE_HOST_APPLE AND APPLE) set(LIBTOOL_NO_WARNING_FLAG "-no_warning_for_no_symbols") endif() endif() - + foreach(lang ${languages}) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "${CMAKE_LIBTOOL} -static ${LIBTOOL_NO_WARNING_FLAG} -o \ @@ -570,6 +570,10 @@ if (LLVM_BUILD_STATIC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") endif() +# Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV. +set(LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank.") +mark_as_advanced(LLVM_TARGET_TRIPLE_ENV) + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run @@ -800,7 +804,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") + # special hack for Solaris to handle crazy system sys/regset.h + include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris") endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) # Make sure we don't get -rdynamic in every binary. For those that need it, Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CODE_OWNERS.TXT Mon Jun 26 20:32:52 2017 (r320374) @@ -195,6 +195,7 @@ D: MemorySanitizer (LLVM part) N: Craig Topper E: craig.topper@gmail.com +E: craig.topper@intel.com D: X86 Backend N: Ulrich Weigand Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/CREDITS.TXT Mon Jun 26 20:32:52 2017 (r320374) @@ -220,7 +220,7 @@ W: http://randomhacks.net/ D: llvm-config script N: Anton Korobeynikov -E: asl@math.spbu.ru +E: anton at korobeynikov dot info D: Mingw32 fixes, cross-compiling support, stdcall/fastcall calling conv. D: x86/linux PIC codegen, aliases, regparm/visibility attributes D: Switch lowering refactoring Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -1133,6 +1133,19 @@ function(configure_lit_site_cfg input output) set(LIT_SITE_CFG_IN_HEADER "## Autogenerated from ${input}\n## Do not edit!") + # Override config_target_triple (and the env) + if(LLVM_TARGET_TRIPLE_ENV) + # This is expanded into the heading. + string(CONCAT LIT_SITE_CFG_IN_HEADER "${LIT_SITE_CFG_IN_HEADER}\n\n" + "import os\n" + "target_env = \"${LLVM_TARGET_TRIPLE_ENV}\"\n" + "config.target_triple = config.environment[target_env] = os.environ.get(target_env, \"${TARGET_TRIPLE}\")\n" + ) + + # This is expanded to; config.target_triple = ""+config.target_triple+"" + set(TARGET_TRIPLE "\"+config.target_triple+\"") + endif() + configure_file(${input} ${output} @ONLY) endfunction() Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -642,6 +642,9 @@ if(LLVM_USE_SANITIZER) append_common_sanitizer_flags() append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + elseif (LLVM_USE_SANITIZER STREQUAL "Leaks") + append_common_sanitizer_flags() + append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") endif() Modified: vendor/llvm/dist/cmake/modules/TableGen.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/TableGen.cmake Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/cmake/modules/TableGen.cmake Mon Jun 26 20:32:52 2017 (r320374) @@ -14,8 +14,31 @@ function(tablegen project ofn) message(FATAL_ERROR "${project}_TABLEGEN_EXE not set") endif() - file(GLOB local_tds "*.td") - file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td") + # Use depfile instead of globbing arbitrary *.td(s) + # DEPFILE is available for Ninja Generator with CMake>=3.7. + if(CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.7) + # Make output path relative to build.ninja, assuming located on + # ${CMAKE_BINARY_DIR}. + # CMake emits build targets as relative paths but Ninja doesn't identify + # absolute path (in *.d) as relative path (in build.ninja) + # Note that tblgen is executed on ${CMAKE_BINARY_DIR} as working directory. + file(RELATIVE_PATH ofn_rel + ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${ofn}) + set(additional_cmdline + -o ${ofn_rel}.tmp + -d ${ofn_rel}.d + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.d + ) + set(local_tds) + set(global_tds) + else() + file(GLOB local_tds "*.td") + file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td") + set(additional_cmdline + -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + ) + endif() if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) @@ -44,7 +67,7 @@ function(tablegen project ofn) COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} ${LLVM_TABLEGEN_FLAGS} ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} - -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + ${additional_cmdline} # The file in LLVM_TARGET_DEFINITIONS may be not in the current # directory and local_tds may not contain it, so we must # explicitly list it here: @@ -104,7 +127,8 @@ macro(add_tablegen target project) set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) - if(NOT XCODE) + # CMake-3.9 doesn't let compilation units depend on their dependent libraries. + if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE) # FIXME: It leaks to user, callee of add_tablegen. set(LLVM_ENABLE_OBJLIB ON) endif() Modified: vendor/llvm/dist/docs/AMDGPUUsage.rst ============================================================================== --- vendor/llvm/dist/docs/AMDGPUUsage.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/AMDGPUUsage.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -587,7 +587,7 @@ Code Object Metadata The code object metadata is specified by the ``NT_AMD_AMDHSA_METADATA`` note record (see :ref:`amdgpu-note-records`). -The metadata is specified as a YAML formated string (see [YAML]_ and +The metadata is specified as a YAML formatted string (see [YAML]_ and :doc:`YamlIO`). The metadata is represented as a single YAML document comprised of the mapping @@ -1031,11 +1031,11 @@ Global variable appropriate section according to if it has initialized data or is readonly. If the symbol is external then its section is ``STN_UNDEF`` and the loader - will resolve relocations using the defintion provided by another code object + will resolve relocations using the definition provided by another code object or explicitly defined by the runtime. All global symbols, whether defined in the compilation unit or external, are - accessed by the machine code indirectly throught a GOT table entry. This + accessed by the machine code indirectly through a GOT table entry. This allows them to be preemptable. The GOT table is only supported when the target triple OS is ``amdhsa`` (see :ref:`amdgpu-target-triples`). @@ -1160,7 +1160,7 @@ Register Mapping Define DWARF register enumeration. If want to present a wavefront state then should expose vector registers as - 64 wide (rather than per work-item view that LLVM uses). Either as seperate + 64 wide (rather than per work-item view that LLVM uses). Either as separate registers, or a 64x4 byte single register. In either case use a new LANE op (akin to XDREF) to select the current lane usage in a location expression. This would also allow scalar register spilling to vector register @@ -1653,7 +1653,7 @@ CP microcode requires the Kernel descritor to be alloc ``COMPUTE_PGM_RSRC2.USER_SGPR``. 6 1 bit enable_trap_handler Set to 1 if code contains a TRAP instruction which - requires a trap hander to + requires a trap handler to be enabled. CP sets @@ -2146,7 +2146,7 @@ This section describes the mapping of LLVM memory mode .. TODO Update when implementation complete. - Support more relaxed OpenCL memory model to be controled by environment + Support more relaxed OpenCL memory model to be controlled by environment component of target triple. The AMDGPU backend supports the memory synchronization scopes specified in @@ -2201,7 +2201,7 @@ For GFX6-GFX9: can be reordered relative to each other, which can result in reordering the visibility of vector memory operations with respect to LDS operations of other wavefronts in the same work-group. A ``s_waitcnt lgkmcnt(0)`` is required to - ensure synchonization between LDS operations and vector memory operations + ensure synchronization between LDS operations and vector memory operations between waves of a work-group, but not between operations performed by the same wavefront. * The vector memory operations are performed as wavefront wide operations and @@ -2226,7 +2226,7 @@ For GFX6-GFX9: scalar memory operations performed by waves executing in different work-groups (which may be executing on different CUs) of an agent can be reordered relative to each other. A ``s_waitcnt vmcnt(0)`` is required to ensure - synchonization between vector memory operations of different CUs. It ensures a + synchronization between vector memory operations of different CUs. It ensures a previous vector memory operation has completed before executing a subsequent vector memory or LDS operation and so can be used to meet the requirements of acquire and release. @@ -2268,7 +2268,7 @@ and vector L1 caches are invalidated between kernel di constant address space data may change between kernel dispatch executions. See :ref:`amdgpu-amdhsa-memory-spaces`. -The one exeception is if scalar writes are used to spill SGPR registers. In this +The one execption is if scalar writes are used to spill SGPR registers. In this case the AMDGPU backend ensures the memory location used to spill is never accessed by vector memory operations at the same time. If scalar writes are used then a ``s_dcache_wb`` is inserted before the ``s_endpgm`` and before a function @@ -3310,7 +3310,7 @@ table be moved before the acquire. - If a fence then same as load atomic, plus no preceding associated fence-paired-atomic can be moved after the fence. - release - If a store atomic/atomicrmw then no preceeding load/load + release - If a store atomic/atomicrmw then no preceding load/load atomic/store/ store atomic/atomicrmw/fence instruction can be moved after the release. - If a fence then same as store atomic, plus no following Modified: vendor/llvm/dist/docs/GetElementPtr.rst ============================================================================== --- vendor/llvm/dist/docs/GetElementPtr.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/GetElementPtr.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -27,7 +27,7 @@ questions. What is the first index of the GEP instruction? ----------------------------------------------- -Quick answer: The index stepping through the first operand. +Quick answer: The index stepping through the second operand. The confusion with the first index usually arises from thinking about the GetElementPtr instruction as if it was a C index operator. They aren't the @@ -59,7 +59,7 @@ Sometimes this question gets rephrased as: won't be dereferenced?* The answer is simply because memory does not have to be accessed to perform the -computation. The first operand to the GEP instruction must be a value of a +computation. The second operand to the GEP instruction must be a value of a pointer type. The value of the pointer is provided directly to the GEP instruction as an operand without any need for accessing memory. It must, therefore be indexed and requires an index operand. Consider this example: @@ -80,8 +80,8 @@ therefore be indexed and requires an index operand. Co In this "C" example, the front end compiler (Clang) will generate three GEP instructions for the three indices through "P" in the assignment statement. The -function argument ``P`` will be the first operand of each of these GEP -instructions. The second operand indexes through that pointer. The third +function argument ``P`` will be the second operand of each of these GEP +instructions. The third operand indexes through that pointer. The fourth operand will be the field offset into the ``struct munger_struct`` type, for either the ``f1`` or ``f2`` field. So, in LLVM assembly the ``munge`` function looks like: @@ -100,8 +100,8 @@ looks like: ret void } -In each case the first operand is the pointer through which the GEP instruction -starts. The same is true whether the first operand is an argument, allocated +In each case the second operand is the pointer through which the GEP instruction +starts. The same is true whether the second operand is an argument, allocated memory, or a global variable. To make this clear, let's consider a more obtuse example: @@ -159,11 +159,11 @@ confusion: i32 }*``. That is, ``%MyStruct`` is a pointer to a structure containing a pointer to a ``float`` and an ``i32``. -#. Point #1 is evidenced by noticing the type of the first operand of the GEP +#. Point #1 is evidenced by noticing the type of the second operand of the GEP instruction (``%MyStruct``) which is ``{ float*, i32 }*``. #. The first index, ``i64 0`` is required to step over the global variable - ``%MyStruct``. Since the first argument to the GEP instruction must always + ``%MyStruct``. Since the second argument to the GEP instruction must always be a value of pointer type, the first index steps through that pointer. A value of 0 means 0 elements offset from that pointer. @@ -267,7 +267,7 @@ in the IR. In the future, it will probably be outright What effect do address spaces have on GEPs? ------------------------------------------- -None, except that the address space qualifier on the first operand pointer type +None, except that the address space qualifier on the second operand pointer type always matches the address space qualifier on the result type. How is GEP different from ``ptrtoint``, arithmetic, and ``inttoptr``? @@ -526,7 +526,7 @@ instruction: #. The GEP instruction never accesses memory, it only provides pointer computations. -#. The first operand to the GEP instruction is always a pointer and it must be +#. The second operand to the GEP instruction is always a pointer and it must be indexed. #. There are no superfluous indices for the GEP instruction. Modified: vendor/llvm/dist/docs/GoldPlugin.rst ============================================================================== --- vendor/llvm/dist/docs/GoldPlugin.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/GoldPlugin.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -7,7 +7,7 @@ Introduction Building with link time optimization requires cooperation from the system linker. LTO support on Linux systems requires that you use the -`gold linker`_ which supports LTO via plugins. This is the same mechanism +`gold linker`_ or ld.bfd from binutils >= 2.21.51.0.2, as they support LTO via plugins. This is the same mechanism used by the `GCC LTO`_ project. The LLVM gold plugin implements the gold plugin interface on top of @@ -23,24 +23,22 @@ The LLVM gold plugin implements the gold plugin interf How to build it =============== -You need to have gold with plugin support and build the LLVMgold plugin. -Check whether you have gold running ``/usr/bin/ld -v``. It will report "GNU -gold" or else "GNU ld" if not. If you have gold, check for plugin support -by running ``/usr/bin/ld -plugin``. If it complains "missing argument" then -you have plugin support. If not, such as an "unknown option" error then you -will either need to build gold or install a version with plugin support. +Check for plugin support by running ``/usr/bin/ld -plugin``. If it complains +"missing argument" then you have plugin support. If not, such as an "unknown option" +error then you will either need to build gold or install a recent version +of ld.bfd with plugin support and then build gold plugin. -* Download, configure and build gold with plugin support: +* Download, configure and build ld.bfd with plugin support: .. code-block:: bash $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils $ mkdir build $ cd build - $ ../binutils/configure --enable-gold --enable-plugins --disable-werror - $ make all-gold + $ ../binutils/configure --disable-werror # ld.bfd includes plugin support by default + $ make all-ld - That should leave you with ``build/gold/ld-new`` which supports + That should leave you with ``build/ld/ld-new`` which supports the ``-plugin`` option. Running ``make`` will additionally build ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins. Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/LangRef.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -1468,6 +1468,19 @@ example: This attribute by itself does not imply restrictions on inter-procedural optimizations. All of the semantic effects the patching may have to be separately conveyed via the linkage type. +``"probe-stack"`` + This attribute indicates that the function will trigger a guard region + in the end of the stack. It ensures that accesses to the stack must be + no further apart than the size of the guard region to a previous + access of the stack. It takes one required string value, the name of + the stack probing function that will be called. + + If a function that has a ``"probe-stack"`` attribute is inlined into + a function with another ``"probe-stack"`` attribute, the resulting + function has the ``"probe-stack"`` attribute of the caller. If a + function that has a ``"probe-stack"`` attribute is inlined into a + function that has no ``"probe-stack"`` attribute at all, the resulting + function has the ``"probe-stack"`` attribute of the callee. ``readnone`` On a function, this attribute indicates that the function computes its result (or decides to unwind an exception) based strictly on its arguments, @@ -1498,6 +1511,21 @@ example: On an argument, this attribute indicates that the function does not write through this pointer argument, even though it may write to the memory that the pointer points to. +``"stack-probe-size"`` + This attribute controls the behavior of stack probes: either + the ``"probe-stack"`` attribute, or ABI-required stack probes, if any. + It defines the size of the guard region. It ensures that if the function + may use more stack space than the size of the guard region, stack probing + sequence will be emitted. It takes one required integer value, which + is 4096 by default. + + If a function that has a ``"stack-probe-size"`` attribute is inlined into + a function with another ``"stack-probe-size"`` attribute, the resulting + function has the ``"stack-probe-size"`` attribute that has the lower + numeric value. If a function that has a ``"stack-probe-size"`` attribute is + inlined into a function that has no ``"stack-probe-size"`` attribute + at all, the resulting function has the ``"stack-probe-size"`` attribute + of the callee. ``writeonly`` On a function, this attribute indicates that the function may write to but does not read from memory. @@ -1989,7 +2017,7 @@ A pointer value is *based* on another pointer value ac following rules: - A pointer value formed from a ``getelementptr`` operation is *based* - on the first value operand of the ``getelementptr``. + on the second value operand of the ``getelementptr``. - The result value of a ``bitcast`` is *based* on the operand of the ``bitcast``. - A pointer value formed by an ``inttoptr`` is *based* on all pointer @@ -3166,7 +3194,7 @@ The following is the syntax for constant expressions: ``getelementptr (TY, CSTPTR, IDX0, IDX1, ...)``, ``getelementptr inbounds (TY, CSTPTR, IDX0, IDX1, ...)`` Perform the :ref:`getelementptr operation ` on constants. As with the :ref:`getelementptr ` - instruction, the index list may have zero or more indexes, which are + instruction, the index list may have one or more indexes, which are required to make sense for the type of "pointer to TY". ``select (COND, VAL1, VAL2)`` Perform the :ref:`select operation ` on constants. @@ -7805,7 +7833,7 @@ base address to start from. The remaining arguments ar that indicate which of the elements of the aggregate object are indexed. The interpretation of each index is dependent on the type being indexed into. The first index always indexes the pointer value given as the -first argument, the second index indexes a value of the type pointed to +second argument, the second index indexes a value of the type pointed to (not necessarily the value directly pointed to, since the first index can be non-zero), etc. The first type indexed into must be a pointer value, subsequent types can be arrays, vectors, and structs. Note that Modified: vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst ============================================================================== --- vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -27,7 +27,7 @@ Vectorization Workflow VPlan-based vectorization involves three major steps, taking a "scenario-based approach" to vectorization planning: -1. Legal Step: check if a loop can be legally vectorized; encode contraints and +1. Legal Step: check if a loop can be legally vectorized; encode constraints and artifacts if so. 2. Plan Step: Modified: vendor/llvm/dist/docs/XRay.rst ============================================================================== --- vendor/llvm/dist/docs/XRay.rst Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/docs/XRay.rst Mon Jun 26 20:32:52 2017 (r320374) @@ -150,7 +150,7 @@ variable, where we list down the options and their def | xray_logfile_base | ``const char*`` | ``xray-log.`` | Filename base for the | | | | | XRay logfile. | +-------------------+-----------------+---------------+------------------------+ -| xray_fdr_log | ``bool`` | ``false`` | Wheter to install the | +| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | | | | | Flight Data Recorder | | | | | (FDR) mode. | +-------------------+-----------------+---------------+------------------------+ Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -40,11 +40,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; public: - using ModuleHandle = decltype(CompileLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(CompileLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), @@ -72,15 +72,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return CompileLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return CompileLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -91,7 +87,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - CompileLayer.removeModuleSet(H); + CompileLayer.removeModule(H); } }; Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -44,22 +44,22 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }) { llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr); @@ -85,15 +85,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -104,11 +100,11 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -47,11 +47,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -59,13 +59,13 @@ class KaleidoscopeJIT { CompileOnDemandLayer CODLayer; public: - using ModuleHandle = decltype(CODLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(CODLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), CompileCallbackManager( @@ -98,15 +98,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return CODLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return CODLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -117,11 +113,11 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - CODLayer.removeModuleSet(H); + CODLayer.removeModule(H); } private: - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -73,11 +73,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -85,14 +85,14 @@ class KaleidoscopeJIT { std::unique_ptr IndirectStubsMgr; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), CompileCallbackMgr( @@ -125,15 +125,11 @@ class KaleidoscopeJIT { return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - make_unique(), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); } Error addFunctionAST(std::unique_ptr FnAST) { @@ -199,7 +195,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: @@ -210,7 +206,7 @@ class KaleidoscopeJIT { return MangledNameStream.str(); } - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -78,11 +78,11 @@ class KaleidoscopeJIT { private: std::unique_ptr TM; const DataLayout DL; - RTDyldObjectLinkingLayer<> ObjectLayer; - IRCompileLayer CompileLayer; + RTDyldObjectLinkingLayer ObjectLayer; + IRCompileLayer CompileLayer; using OptimizeFunction = - std::function(std::unique_ptr)>; + std::function(std::shared_ptr)>; IRTransformLayer OptimizeLayer; @@ -91,7 +91,7 @@ class KaleidoscopeJIT { MyRemote &Remote; public: - using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(OptimizeLayer)::ModuleHandleT; KaleidoscopeJIT(MyRemote &Remote) : TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "", @@ -99,7 +99,7 @@ class KaleidoscopeJIT { DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::unique_ptr M) { + [this](std::shared_ptr M) { return optimizeModule(std::move(M)); }), Remote(Remote) { @@ -153,15 +153,11 @@ class KaleidoscopeJIT { exit(1); } - // Build a singleton module set to hold our module. - std::vector> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return OptimizeLayer.addModuleSet(std::move(Ms), - std::move(MemMgr), - std::move(Resolver)); + return OptimizeLayer.addModule(std::move(M), + std::move(MemMgr), + std::move(Resolver)); } Error addFunctionAST(std::unique_ptr FnAST) { @@ -231,7 +227,7 @@ class KaleidoscopeJIT { } void removeModule(ModuleHandle H) { - OptimizeLayer.removeModuleSet(H); + OptimizeLayer.removeModule(H); } private: @@ -242,7 +238,7 @@ class KaleidoscopeJIT { return MangledNameStream.str(); } - std::unique_ptr optimizeModule(std::unique_ptr M) { + std::shared_ptr optimizeModule(std::shared_ptr M) { // Create a function pass manager. auto FPM = llvm::make_unique(M.get()); Modified: vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon Jun 26 20:32:52 2017 (r320374) @@ -39,9 +39,9 @@ namespace orc { class KaleidoscopeJIT { public: - using ObjLayerT = RTDyldObjectLinkingLayer<>; - using CompileLayerT = IRCompileLayer; - using ModuleHandleT = CompileLayerT::ModuleSetHandleT; + using ObjLayerT = RTDyldObjectLinkingLayer; + using CompileLayerT = IRCompileLayer; + using ModuleHandleT = CompileLayerT::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), @@ -62,9 +62,9 @@ class KaleidoscopeJIT { (public) return JITSymbol(nullptr); }, [](const std::string &S) { return nullptr; }); - auto H = CompileLayer.addModuleSet(singletonSet(std::move(M)), - make_unique(), - std::move(Resolver)); + auto H = CompileLayer.addModule(std::move(M), + make_unique(), + std::move(Resolver)); ModuleHandles.push_back(H); return H; @@ -72,7 +72,7 @@ class KaleidoscopeJIT { (public) void removeModule(ModuleHandleT H) { ModuleHandles.erase(find(ModuleHandles, H)); - CompileLayer.removeModuleSet(H); + CompileLayer.removeModule(H); } JITSymbol findSymbol(const std::string Name) { @@ -87,12 +87,6 @@ class KaleidoscopeJIT { (public) Mangler::getNameWithPrefix(MangledNameStream, Name, DL); } return MangledName; - } - - template static std::vector singletonSet(T t) { - std::vector Vec; - Vec.push_back(std::move(t)); - return Vec; } JITSymbol findMangledSymbol(const std::string &Name) { Modified: vendor/llvm/dist/include/llvm-c/OrcBindings.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/OrcBindings.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm-c/OrcBindings.h Mon Jun 26 20:32:52 2017 (r320374) @@ -29,6 +29,8 @@ extern "C" { #endif +typedef struct LLVMOpaqueSharedModule *LLVMSharedModuleRef; +typedef struct LLVMOpaqueSharedObjectBuffer *LLVMSharedObjectBufferRef; typedef struct LLVMOrcOpaqueJITStack *LLVMOrcJITStackRef; typedef uint32_t LLVMOrcModuleHandle; typedef uint64_t LLVMOrcTargetAddress; @@ -39,6 +41,45 @@ typedef uint64_t (*LLVMOrcLazyCompileCallbackFn)(LLVMO typedef enum { LLVMOrcErrSuccess = 0, LLVMOrcErrGeneric } LLVMOrcErrorCode; /** + * Turn an LLVMModuleRef into an LLVMSharedModuleRef. + * + * The JIT uses shared ownership for LLVM modules, since it is generally + * difficult to know when the JIT will be finished with a module (and the JIT + * has no way of knowing when a user may be finished with one). + * + * Calling this method with an LLVMModuleRef creates a shared-pointer to the + * module, and returns a reference to this shared pointer. + * + * The shared module should be disposed when finished with by calling + * LLVMOrcDisposeSharedModule (not LLVMDisposeModule). The Module will be + * deleted when the last shared pointer owner relinquishes it. + */ + +LLVMSharedModuleRef LLVMOrcMakeSharedModule(LLVMModuleRef Mod); + +/** + * Dispose of a shared module. + * + * The module should not be accessed after this call. The module will be + * deleted once all clients (including the JIT itself) have released their + * shared pointers. + */ + +void LLVMOrcDisposeSharedModuleRef(LLVMSharedModuleRef SharedMod); + +/** + * Get an LLVMSharedObjectBufferRef from an LLVMMemoryBufferRef. + */ +LLVMSharedObjectBufferRef +LLVMOrcMakeSharedObjectBuffer(LLVMMemoryBufferRef ObjBuffer); + +/** + * Dispose of a shared object buffer. + */ +void +LLVMOrcDisposeSharedObjectBufferRef(LLVMSharedObjectBufferRef SharedObjBuffer); + +/** * Create an ORC JIT stack. * * The client owns the resulting stack, and must call OrcDisposeInstance(...) @@ -95,7 +136,8 @@ LLVMOrcErrorCode LLVMOrcSetIndirectStubPointer(LLVMOrc * Add module to be eagerly compiled. */ LLVMOrcModuleHandle -LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, +LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStack, + LLVMSharedModuleRef Mod, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); @@ -103,7 +145,8 @@ LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStac * Add module to be lazily compiled one function at a time. */ LLVMOrcModuleHandle -LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, +LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack, + LLVMSharedModuleRef Mod, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); @@ -111,7 +154,7 @@ LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack * Add an object file. */ LLVMOrcModuleHandle LLVMOrcAddObjectFile(LLVMOrcJITStackRef JITStack, - LLVMObjectFileRef Obj, + LLVMSharedObjectBufferRef Obj, LLVMOrcSymbolResolverFn SymbolResolver, void *SymbolResolverCtx); Modified: vendor/llvm/dist/include/llvm/ADT/APFloat.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APFloat.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/APFloat.h Mon Jun 26 20:32:52 2017 (r320374) @@ -140,8 +140,8 @@ enum lostFraction { // Example of truncated bits: // implementation classes. This struct should not define any non-static data // members. struct APFloatBase { - // TODO remove this and use APInt typedef directly. typedef APInt::WordType integerPart; + static const unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; /// A signed type to represent a floating point numbers unbiased exponent. typedef signed short ExponentType; Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Mon Jun 26 20:32:52 2017 (r320374) @@ -213,6 +213,12 @@ class LLVM_NODISCARD APInt { (private) /// out-of-line slow case for countLeadingZeros unsigned countLeadingZerosSlowCase() const LLVM_READONLY; + /// out-of-line slow case for countLeadingOnes. + unsigned countLeadingOnesSlowCase() const LLVM_READONLY; + + /// out-of-line slow case for countTrailingZeros. + unsigned countTrailingZerosSlowCase() const LLVM_READONLY; + /// out-of-line slow case for countTrailingOnes unsigned countTrailingOnesSlowCase() const LLVM_READONLY; @@ -383,7 +389,7 @@ class LLVM_NODISCARD APInt { (private) bool isAllOnesValue() const { if (isSingleWord()) return U.VAL == WORD_MAX >> (APINT_BITS_PER_WORD - BitWidth); - return countPopulationSlowCase() == BitWidth; + return countTrailingOnesSlowCase() == BitWidth; } /// \brief Determine if all bits are clear @@ -408,7 +414,9 @@ class LLVM_NODISCARD APInt { (private) /// This checks to see if the value of this APInt is the maximum signed /// value for the APInt's bit width. bool isMaxSignedValue() const { - return !isNegative() && countPopulation() == BitWidth - 1; + if (isSingleWord()) + return U.VAL == ((WordType(1) << (BitWidth - 1)) - 1); + return !isNegative() && countTrailingOnesSlowCase() == BitWidth - 1; } /// \brief Determine if this is the smallest unsigned value. @@ -422,7 +430,9 @@ class LLVM_NODISCARD APInt { (private) /// This checks to see if the value of this APInt is the minimum signed /// value for the APInt's bit width. bool isMinSignedValue() const { - return isNegative() && isPowerOf2(); + if (isSingleWord()) + return U.VAL == (WordType(1) << (BitWidth - 1)); + return isNegative() && countTrailingZerosSlowCase() == BitWidth - 1; } /// \brief Check if this APInt has an N-bits unsigned integer value. @@ -1574,7 +1584,11 @@ class LLVM_NODISCARD APInt { (private) /// /// \returns 0 if the high order bit is not set, otherwise returns the number /// of 1 bits from the most significant to the least - unsigned countLeadingOnes() const LLVM_READONLY; + unsigned countLeadingOnes() const { + if (isSingleWord()) + return llvm::countLeadingOnes(U.VAL << (APINT_BITS_PER_WORD - BitWidth)); + return countLeadingOnesSlowCase(); + } /// Computes the number of leading bits of this APInt that are equal to its /// sign bit. @@ -1590,7 +1604,11 @@ class LLVM_NODISCARD APInt { (private) /// /// \returns BitWidth if the value is zero, otherwise returns the number of /// zeros from the least significant bit to the first one bit. - unsigned countTrailingZeros() const LLVM_READONLY; + unsigned countTrailingZeros() const { + if (isSingleWord()) + return std::min(unsigned(llvm::countTrailingZeros(U.VAL)), BitWidth); + return countTrailingZerosSlowCase(); + } /// \brief Count the number of trailing one bits. /// Modified: vendor/llvm/dist/include/llvm/ADT/StringExtras.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/StringExtras.h Mon Jun 26 20:17:48 2017 (r320373) +++ vendor/llvm/dist/include/llvm/ADT/StringExtras.h Mon Jun 26 20:32:52 2017 (r320374) @@ -15,10 +15,12 @@ #define LLVM_ADT_STRINGEXTRAS_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include #include #include +#include #include #include #include @@ -127,6 +129,32 @@ static inline std::string fromHex(StringRef Input) { /// Returns true if the number was successfully converted, false otherwise. template bool to_integer(StringRef S, N &Num, unsigned Base = 0) { return !S.getAsInteger(Base, Num); +} + +namespace detail { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:02 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 945D0D91219; Mon, 26 Jun 2017 20:33:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADE564C35; Mon, 26 Jun 2017 20:33:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKX1xB098726; Mon, 26 Jun 2017 20:33:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKX1u6098725; Mon, 26 Jun 2017 20:33:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKX1u6098725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320375 - vendor/llvm/llvm-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:02 -0000 Author: dim Date: Mon Jun 26 20:33:01 2017 New Revision: 320375 URL: https://svnweb.freebsd.org/changeset/base/320375 Log: Tag llvm trunk r306325. Added: vendor/llvm/llvm-trunk-r306325/ - copied from r320374, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:15 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF0D7D91323; Mon, 26 Jun 2017 20:33:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 832D864D43; Mon, 26 Jun 2017 20:33:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXELc098789; Mon, 26 Jun 2017 20:33:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXDgq098773; Mon, 26 Jun 2017 20:33:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXDgq098773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320376 - in vendor/clang/dist: docs docs/tools include/clang-c include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Driver include/clang/Edit include/clang/Format... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:16 -0000 Author: dim Date: Mon Jun 26 20:33:12 2017 New Revision: 320376 URL: https://svnweb.freebsd.org/changeset/base/320376 Log: Vendor import of clang trunk r306325: https://llvm.org/svn/llvm-project/cfe/trunk@306325 Added: vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h (contents, props changed) vendor/clang/dist/lib/Driver/ToolChains/Ananas.cpp (contents, props changed) vendor/clang/dist/lib/Driver/ToolChains/Ananas.h (contents, props changed) vendor/clang/dist/lib/Format/UsingDeclarationsSorter.cpp (contents, props changed) vendor/clang/dist/lib/Format/UsingDeclarationsSorter.h (contents, props changed) vendor/clang/dist/lib/Frontend/PrecompiledPreamble.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/autogenerated_automoc.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/dbus_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/moc_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/not-autogenerated.cpp (contents, props changed) vendor/clang/dist/test/Analysis/copypaste/ui_autogenerated.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c (contents, props changed) vendor/clang/dist/test/CodeGen/ms-intrinsics-other.c (contents, props changed) vendor/clang/dist/test/CodeGen/no-devirt.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/objc_copyStruct.m vendor/clang/dist/test/Driver/ananas.c (contents, props changed) vendor/clang/dist/test/Driver/compress-noias.c (contents, props changed) vendor/clang/dist/test/Driver/fsanitize-object-size.c (contents, props changed) vendor/clang/dist/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext vendor/clang/dist/test/Frontend/pp-only-no-editor-placeholders.c (contents, props changed) vendor/clang/dist/test/Import/indirect-struct-member-access/ vendor/clang/dist/test/Import/indirect-struct-member-access/Inputs/ vendor/clang/dist/test/Import/indirect-struct-member-access/Inputs/S.c (contents, props changed) vendor/clang/dist/test/Import/indirect-struct-member-access/test.c (contents, props changed) vendor/clang/dist/test/Index/single-file-parse.m vendor/clang/dist/test/Misc/Inputs/module.modulemap vendor/clang/dist/test/Misc/cc1as-compress.s (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess/other.h (contents, props changed) vendor/clang/dist/test/Modules/const-var-init-update.cpp (contents, props changed) vendor/clang/dist/test/Modules/interface-visibility.m vendor/clang/dist/test/Parser/objc-at-implementation-eof-crash.m vendor/clang/dist/test/Parser/objc-at-interface-eof-crash.m vendor/clang/dist/test/SemaCXX/invalid-template-params.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-throw-out-noexcept-func.cpp (contents, props changed) vendor/clang/dist/test/SemaObjC/unguarded-availability-new.m vendor/clang/dist/unittests/Format/UsingDeclarationsSorterTest.cpp (contents, props changed) Deleted: vendor/clang/dist/test/Analysis/builtin-assume.c vendor/clang/dist/test/CodeGen/pr27892.c vendor/clang/dist/test/Index/singe-file-parse.m Modified: vendor/clang/dist/docs/Block-ABI-Apple.rst vendor/clang/dist/docs/ClangFormat.rst vendor/clang/dist/docs/ClangFormatStyleOptions.rst vendor/clang/dist/docs/LibFormat.rst vendor/clang/dist/docs/MemorySanitizer.rst vendor/clang/dist/docs/SourceBasedCodeCoverage.rst vendor/clang/dist/docs/ThinLTO.rst vendor/clang/dist/docs/tools/dump_format_style.py vendor/clang/dist/include/clang-c/CXCompilationDatabase.h vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/Analysis/CloneDetection.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Edit/EditedSource.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDumper.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/ExternalASTMerger.cpp vendor/clang/dist/lib/Analysis/CloneDetection.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypeCache.h vendor/clang/dist/lib/CodeGen/SwiftCallingConv.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/DriverOptions.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp vendor/clang/dist/lib/Driver/ToolChains/WebAssembly.cpp vendor/clang/dist/lib/Edit/EditedSource.cpp vendor/clang/dist/lib/Format/CMakeLists.txt vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaCUDA.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CloneChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineC.cpp vendor/clang/dist/test/Analysis/analyzer-config.c vendor/clang/dist/test/Analysis/analyzer-config.cpp vendor/clang/dist/test/Analysis/builtin-functions.cpp vendor/clang/dist/test/Analysis/null-deref-ps-region.c vendor/clang/dist/test/CXX/except/except.spec/p11.cpp vendor/clang/dist/test/CodeGen/64bit-swiftcall.c vendor/clang/dist/test/CodeGen/aarch64-neon-intrinsics.c vendor/clang/dist/test/CodeGen/aarch64-neon-ldst-one.c vendor/clang/dist/test/CodeGen/address-space.c vendor/clang/dist/test/CodeGen/arm_neon_intrinsics.c vendor/clang/dist/test/CodeGen/default-address-space.c vendor/clang/dist/test/CodeGen/mcount.c vendor/clang/dist/test/CodeGen/ms-inline-asm.c vendor/clang/dist/test/CodeGen/ms-intrinsics-rotations.c vendor/clang/dist/test/CodeGen/target-data.c vendor/clang/dist/test/CodeGen/vectorcall.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/amdgcn-automatic-variable.cpp vendor/clang/dist/test/CodeGenObjC/ubsan-nonnull-and-nullability.m vendor/clang/dist/test/CodeGenObjC/ubsan-nullability.m vendor/clang/dist/test/CodeGenOpenCL/spir_version.cl vendor/clang/dist/test/Driver/autocomplete.c vendor/clang/dist/test/Driver/compress.c vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/Driver/nozlibcompress.c vendor/clang/dist/test/Driver/wasm-toolchain.c vendor/clang/dist/test/FixIt/fixit-format-darwin.m vendor/clang/dist/test/Frontend/optimization-remark-with-hotness.c vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Misc/ast-dump-decl.c vendor/clang/dist/test/Misc/ast-dump-decl.cpp vendor/clang/dist/test/Modules/Inputs/preprocess/file.h vendor/clang/dist/test/Modules/Inputs/preprocess/fwd.h vendor/clang/dist/test/Modules/Inputs/preprocess/module.modulemap vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Modules/string_names.cpp vendor/clang/dist/test/Sema/asm.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/SemaCXX/PR16677.cpp vendor/clang/dist/test/SemaCXX/cxx1y-deduced-return-type.cpp vendor/clang/dist/test/SemaCXX/cxx1z-noexcept-function-type.cpp vendor/clang/dist/test/SemaCXX/friend2.cpp vendor/clang/dist/test/SemaOpenCL/storageclass.cl vendor/clang/dist/tools/clang-format/clang-format.py vendor/clang/dist/tools/clang-import-test/clang-import-test.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/unittests/Format/CMakeLists.txt vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/utils/TableGen/NeonEmitter.cpp vendor/clang/dist/utils/bash-autocomplete.sh Modified: vendor/clang/dist/docs/Block-ABI-Apple.rst ============================================================================== --- vendor/clang/dist/docs/Block-ABI-Apple.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/Block-ABI-Apple.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -856,15 +856,15 @@ mentioned above, call: .. code-block:: c - _Block_object_assign(&dst->target, src->target, BLOCK_FIELD_); + _Block_object_assign(&dst->target, src->target, BLOCK_FIELD_); in the copy helper and: .. code-block:: c - _Block_object_dispose(->target, BLOCK_FIELD_); + _Block_object_dispose(->target, BLOCK_FIELD_); -in the dispose helper where ```` is: +in the dispose helper where ```` is: .. code-block:: c @@ -888,7 +888,7 @@ and functions are generated in the same manner. Under ObjC we allow ``__weak`` as an attribute on ``__block`` variables, and this causes the addition of ``BLOCK_FIELD_IS_WEAK`` orred onto the ``BLOCK_FIELD_IS_BYREF`` flag when copying the ``block_byref`` structure in the -``Block`` copy helper, and onto the ``BLOCK_FIELD_`` field within the +``Block`` copy helper, and onto the ``BLOCK_FIELD_`` field within the ``block_byref`` copy/dispose helper calls. The prototypes, and summary, of the helper functions are: Modified: vendor/clang/dist/docs/ClangFormat.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormat.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ClangFormat.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -120,6 +120,18 @@ entity. It operates on the current, potentially unsaved buffer and does not create or save any files. To revert a formatting, just undo. +An alternative option is to format changes when saving a file and thus to +have a zero-effort integration into the coding workflow. To do this, add this to +your `.vimrc`: + +.. code-block:: vim + + function! Formatonsave() + let l:formatdiff = 1 + pyf ~/llvm/tools/clang/tools/clang-format/clang-format.py + endfunction + autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave() + Emacs Integration ================= Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormatStyleOptions.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -309,12 +309,28 @@ the configuration (without a prefix: ``Auto``). * ``SFS_None`` (in configuration: ``None``) Never merge functions into a single line. + * ``SFS_InlineOnly`` (in configuration: ``InlineOnly``) + Only merge functions defined inside a class. Same as "inline", + except it does not implies "empty": i.e. top level empty functions + are not merged either. + + .. code-block:: c++ + + class Foo { + void f() { foo(); } + }; + void f() { + foo(); + } + void f() { + } + * ``SFS_Empty`` (in configuration: ``Empty``) Only merge empty functions. .. code-block:: c++ - void f() { bar(); } + void f() {} void f2() { bar2(); } @@ -327,6 +343,10 @@ the configuration (without a prefix: ``Auto``). class Foo { void f() { foo(); } }; + void f() { + foo(); + } + void f() {} * ``SFS_All`` (in configuration: ``All``) Merge all functions fitting on a single line. @@ -518,148 +538,160 @@ the configuration (without a prefix: ``Auto``). * ``bool AfterClass`` Wrap class definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - class foo - {}; + true: + class foo {}; - false: - class foo {}; + false: + class foo + {}; * ``bool AfterControlStatement`` Wrap control statements (``if``/``for``/``while``/``switch``/..). - .. code-block:: c++ + .. code-block:: c++ - true: - if (foo()) - { - } else - {} - for (int i = 0; i < 10; ++i) - {} + true: + if (foo()) + { + } else + {} + for (int i = 0; i < 10; ++i) + {} - false: - if (foo()) { - } else { - } - for (int i = 0; i < 10; ++i) { - } + false: + if (foo()) { + } else { + } + for (int i = 0; i < 10; ++i) { + } * ``bool AfterEnum`` Wrap enum definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - enum X : int - { - B - }; + true: + enum X : int + { + B + }; - false: - enum X : int { B }; + false: + enum X : int { B }; * ``bool AfterFunction`` Wrap function definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - void foo() - { - bar(); - bar2(); - } + true: + void foo() + { + bar(); + bar2(); + } - false: - void foo() { - bar(); - bar2(); - } + false: + void foo() { + bar(); + bar2(); + } * ``bool AfterNamespace`` Wrap namespace definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - namespace - { - int foo(); - int bar(); - } + true: + namespace + { + int foo(); + int bar(); + } - false: - namespace { - int foo(); - int bar(); - } + false: + namespace { + int foo(); + int bar(); + } * ``bool AfterObjCDeclaration`` Wrap ObjC definitions (``@autoreleasepool``, interfaces, ..). * ``bool AfterStruct`` Wrap struct definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - struct foo - { - int x; - }; + true: + struct foo + { + int x; + }; - false: - struct foo { - int x; - }; + false: + struct foo { + int x; + }; * ``bool AfterUnion`` Wrap union definitions. - .. code-block:: c++ + .. code-block:: c++ - true: - union foo - { - int x; - } + true: + union foo + { + int x; + } - false: - union foo { - int x; - } + false: + union foo { + int x; + } * ``bool BeforeCatch`` Wrap before ``catch``. - .. code-block:: c++ + .. code-block:: c++ - true: - try { - foo(); - } - catch () { - } + true: + try { + foo(); + } + catch () { + } - false: - try { - foo(); - } catch () { - } + false: + try { + foo(); + } catch () { + } * ``bool BeforeElse`` Wrap before ``else``. - .. code-block:: c++ + .. code-block:: c++ - true: - if (foo()) { - } - else { - } + true: + if (foo()) { + } + else { + } - false: - if (foo()) { - } else { - } + false: + if (foo()) { + } else { + } * ``bool IndentBraces`` Indent the wrapped braces themselves. + * ``bool SplitEmptyFunctionBody`` If ``false``, empty function body can be put on a single line. + This option is used only if the opening brace of the function has + already been wrapped, i.e. the `AfterFunction` brace wrapping mode is + set, and the function could/should not be put on a single line (as per + `AllowShortFunctionsOnASingleLine` and constructor formatting options). + .. code-block:: c++ + + int f() vs. inf f() + {} { + } + + **BreakAfterJavaFieldAnnotations** (``bool``) Break after each annotation on a field in Java files. @@ -899,18 +931,41 @@ the configuration (without a prefix: ``Auto``). firstValue : SecondValueVeryVeryVeryVeryLong; -**BreakConstructorInitializersBeforeComma** (``bool``) - Always break constructor initializers before commas and align - the commas with the colon. +**BreakConstructorInitializers** (``BreakConstructorInitializersStyle``) + The constructor initializers style to use. - .. code-block:: c++ + Possible values: - true: false: - SomeClass::Constructor() vs. SomeClass::Constructor() : a(a), - : a(a) b(b), - , b(b) c(c) {} - , c(c) {} + * ``BCIS_BeforeColon`` (in configuration: ``BeforeColon``) + Break constructor initializers before the colon and after the commas. + .. code-block:: c++ + + Constructor() + : initializer1(), + initializer2() + + * ``BCIS_BeforeComma`` (in configuration: ``BeforeComma``) + Break constructor initializers before the colon and commas, and align + the commas with the colon. + + .. code-block:: c++ + + Constructor() + : initializer1() + , initializer2() + + * ``BCIS_AfterColon`` (in configuration: ``AfterColon``) + Break constructor initializers after the colon and commas. + + .. code-block:: c++ + + Constructor() : + initializer1(), + initializer2() + + + **BreakStringLiterals** (``bool``) Allow breaking string literals when formatting. @@ -931,6 +986,31 @@ the configuration (without a prefix: ``Auto``). // Will leave the following line unaffected #include // FOOBAR pragma: keep +**CompactNamespaces** (``bool``) + If ``true``, consecutive namespace declarations will be on the same + line. If ``false``, each namespace is declared on a new line. + + .. code-block:: c++ + + true: + namespace Foo { namespace Bar { + }} + + false: + namespace Foo { + namespace Bar { + } + } + + If it does not fit on a single line, the overflowing namespaces get + wrapped: + + .. code-block:: c++ + + namespace Foo { namespace Bar { + namespace Extra { + }}} + **ConstructorInitializerAllOnOneLineOrOnePerLine** (``bool``) If the constructor initializers don't fit on a line, put each initializer on its own line. @@ -1321,6 +1401,9 @@ the configuration (without a prefix: ``Auto``). Add a space in front of an Objective-C protocol list, i.e. use ``Foo `` instead of ``Foo``. +**PenaltyBreakAssignment** (``unsigned``) + The penalty for breaking around an assignment operator. + **PenaltyBreakBeforeFirstCallParameter** (``unsigned``) The penalty for breaking a function call after ``call(``. @@ -1391,6 +1474,15 @@ the configuration (without a prefix: ``Auto``). false: true: #include "b.h" vs. #include "a.h" #include "a.h" #include "b.h" + +**SortUsingDeclarations** (``bool``) + If ``true``, clang-format will sort using declarations. + + .. code-block:: c++ + + false: true: + using std::cout; vs. using std::cin; + using std::cin; using std::cout; **SpaceAfterCStyleCast** (``bool``) If ``true``, a space is inserted after C style casts. Modified: vendor/clang/dist/docs/LibFormat.rst ============================================================================== --- vendor/clang/dist/docs/LibFormat.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/LibFormat.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -28,7 +28,9 @@ The core routine of LibFormat is ``reformat()``: This reads a token stream out of the lexer ``Lex`` and reformats all the code ranges in ``Ranges``. The ``FormatStyle`` controls basic decisions made during -formatting. A list of options can be found under :ref:`style-options`. +formatting. A list of options can be found under :ref:`style-options`. + +The style options are described in :doc:`ClangFormatStyleOptions`. .. _style-options: Modified: vendor/clang/dist/docs/MemorySanitizer.rst ============================================================================== --- vendor/clang/dist/docs/MemorySanitizer.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/MemorySanitizer.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -27,7 +27,7 @@ executable, so make sure to use ``clang`` (not ``ld``) link step. When linking shared libraries, the MemorySanitizer run-time is not linked, so ``-Wl,-z,defs`` may cause link errors (don't use it with MemorySanitizer). To get a reasonable performance add ``-O1`` or -higher. To get meaninful stack traces in error messages add +higher. To get meaningful stack traces in error messages add ``-fno-omit-frame-pointer``. To get perfect stack traces you may need to disable inlining (just use ``-O1``) and tail call elimination (``-fno-optimize-sibling-calls``). Modified: vendor/clang/dist/docs/SourceBasedCodeCoverage.rst ============================================================================== --- vendor/clang/dist/docs/SourceBasedCodeCoverage.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/SourceBasedCodeCoverage.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -274,6 +274,11 @@ To specify an alternate directory for raw profiles, us Drawbacks and limitations ========================= +* Prior to version 2.26, the GNU binutils BFD linker is not able link programs + compiled with ``-fcoverage-mapping`` in its ``--gc-sections`` mode. Possible + workarounds include disabling ``--gc-sections``, upgrading to a newer version + of BFD, or using the Gold linker. + * Code coverage does not handle unpredictable changes in control flow or stack unwinding in the presence of exceptions precisely. Consider the following function: Modified: vendor/clang/dist/docs/ThinLTO.rst ============================================================================== --- vendor/clang/dist/docs/ThinLTO.rst Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/ThinLTO.rst Mon Jun 26 20:33:12 2017 (r320376) @@ -126,6 +126,50 @@ which currently must be enabled through a linker optio - lld (as of LLVM r296702): ``-Wl,--thinlto-cache-dir=/path/to/cache`` +Cache Pruning +------------- + +To help keep the size of the cache under control, ThinLTO supports cache +pruning. Cache pruning is supported with ld64 and ELF lld, but currently only +ELF lld allows you to control the policy with a policy string. The cache +policy must be specified with a linker option. + +- ELF lld (as of LLVM r298036): + ``-Wl,--thinlto-cache-policy,POLICY`` + +A policy string is a series of key-value pairs separated by ``:`` characters. +Possible key-value pairs are: + +- ``cache_size=X%``: The maximum size for the cache directory is ``X`` percent + of the available space on the the disk. Set to 100 to indicate no limit, + 50 to indicate that the cache size will not be left over half the available + disk space. A value over 100 is invalid. A value of 0 disables the percentage + size-based pruning. The default is 75%. + +- ``cache_size_bytes=X``, ``cache_size_bytes=Xk``, ``cache_size_bytes=Xm``, + ``cache_size_bytes=Xg``: + Sets the maximum size for the cache directory to ``X`` bytes (or KB, MB, + GB respectively). A value over the amount of available space on the disk + will be reduced to the amount of available space. A value of 0 disables + the byte size-based pruning. The default is no byte size-based pruning. + + Note that ThinLTO will apply both size-based pruning policies simultaneously, + and changing one does not affect the other. For example, a policy of + ``cache_size_bytes=1g`` on its own will cause both the 1GB and default 75% + policies to be applied unless the default ``cache_size`` is overridden. + +- ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the + expiration time for cache files to ``X`` seconds (or minutes, hours + respectively). When a file hasn't been accessed for ``prune_after`` seconds, + it is removed from the cache. A value of 0 disables the expiration-based + pruning. The default is 1 week. + +- ``prune_interval=Xs``, ``prune_interval=Xm``, ``prune_interval=Xh``: + Sets the pruning interval to ``X`` seconds (or minutes, hours + respectively). This is intended to be used to avoid scanning the directory + too often. It does not impact the decision of which files to prune. A + value of 0 forces the scan to occur. The default is every 20 minutes. + Clang Bootstrap --------------- Modified: vendor/clang/dist/docs/tools/dump_format_style.py ============================================================================== --- vendor/clang/dist/docs/tools/dump_format_style.py Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/docs/tools/dump_format_style.py Mon Jun 26 20:33:12 2017 (r320376) @@ -24,10 +24,10 @@ def doxygen2rst(text): text = re.sub(r'\\\w+ ', '', text) return text -def indent(text, columns): +def indent(text, columns, indent_first_line=True): indent = ' ' * columns s = re.sub(r'\n([^\n])', '\n' + indent + '\\1', text, flags=re.S) - if s.startswith('\n'): + if not indent_first_line or s.startswith('\n'): return s return indent + s @@ -64,7 +64,9 @@ class NestedField: self.comment = comment.strip() def __str__(self): - return '\n* ``%s`` %s' % (self.name, doxygen2rst(self.comment)) + return '\n* ``%s`` %s' % ( + self.name, + doxygen2rst(indent(self.comment, 2, indent_first_line=False))) class Enum: def __init__(self, name, comment): @@ -179,7 +181,7 @@ def read_options(header): if enums.has_key(option.type): option.enum = enums[option.type] elif nested_structs.has_key(option.type): - option.nested_struct = nested_structs[option.type]; + option.nested_struct = nested_structs[option.type] else: raise Exception('Unknown type: %s' % option.type) return options @@ -195,4 +197,3 @@ contents = substitute(contents, 'FORMAT_STYLE_OPTIONS' with open(DOC_FILE, 'wb') as output: output.write(contents) - Modified: vendor/clang/dist/include/clang-c/CXCompilationDatabase.h ============================================================================== --- vendor/clang/dist/include/clang-c/CXCompilationDatabase.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang-c/CXCompilationDatabase.h Mon Jun 26 20:33:12 2017 (r320376) @@ -7,7 +7,7 @@ |* *| |*===----------------------------------------------------------------------===*| |* *| -|* This header provides a public inferface to use CompilationDatabase without *| +|* This header provides a public interface to use CompilationDatabase without *| |* the full Clang C++ API. *| |* *| \*===----------------------------------------------------------------------===*/ Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang-c/Index.h Mon Jun 26 20:33:12 2017 (r320376) @@ -7,7 +7,7 @@ |* *| |*===----------------------------------------------------------------------===*| |* *| -|* This header provides a public inferface to a Clang library for extracting *| +|* This header provides a public interface to a Clang library for extracting *| |* high-level symbol information from source files without exposing the full *| |* Clang C++ API. *| |* *| Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/AST/Decl.h Mon Jun 26 20:33:12 2017 (r320376) @@ -1656,6 +1656,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec unsigned HasImplicitReturnZero : 1; unsigned IsLateTemplateParsed : 1; unsigned IsConstexpr : 1; + unsigned InstantiationIsPending:1; /// \brief Indicates if the function uses __try. unsigned UsesSEHTry : 1; @@ -1751,6 +1752,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec IsDeleted(false), IsTrivial(false), IsDefaulted(false), IsExplicitlyDefaulted(false), HasImplicitReturnZero(false), IsLateTemplateParsed(false), IsConstexpr(isConstexprSpecified), + InstantiationIsPending(false), UsesSEHTry(false), HasSkippedBody(false), WillHaveBody(false), EndRangeLoc(NameInfo.getEndLoc()), TemplateOrSpecialization(), DNLoc(NameInfo.getInfo()) {} @@ -1872,7 +1874,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// bool isThisDeclarationADefinition() const { return IsDeleted || IsDefaulted || Body || IsLateTemplateParsed || - hasDefiningAttr(); + WillHaveBody || hasDefiningAttr(); } /// doesThisDeclarationHaveABody - Returns whether this specific @@ -1942,6 +1944,15 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// Whether this is a (C++11) constexpr function or constexpr constructor. bool isConstexpr() const { return IsConstexpr; } void setConstexpr(bool IC) { IsConstexpr = IC; } + + /// \brief Whether the instantiation of this function is pending. + /// This bit is set when the decision to instantiate this function is made + /// and unset if and when the function body is created. That leaves out + /// cases where instantiation did not happen because the template definition + /// was not seen in this TU. This bit remains set in those cases, under the + /// assumption that the instantiation will happen in some other TU. + bool instantiationIsPending() const { return InstantiationIsPending; } + void setInstantiationIsPending(bool IC) { InstantiationIsPending = IC; } /// \brief Indicates the function uses __try. bool usesSEHTry() const { return UsesSEHTry; } Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Mon Jun 26 20:33:12 2017 (r320376) @@ -202,26 +202,33 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu OBJC_TQ_CSNullability = 0x40 }; -protected: - // Enumeration values used in the bits stored in NextInContextAndBits. - enum { - /// \brief Whether this declaration is a top-level declaration (function, - /// global variable, etc.) that is lexically inside an objc container - /// definition. - TopLevelDeclInObjCContainerFlag = 0x01, - - /// \brief Whether this declaration is private to the module in which it was - /// defined. - ModulePrivateFlag = 0x02 + /// The kind of ownership a declaration has, for visibility purposes. + /// This enumeration is designed such that higher values represent higher + /// levels of name hiding. + enum class ModuleOwnershipKind : unsigned { + /// This declaration is not owned by a module. + Unowned, + /// This declaration has an owning module, but is globally visible + /// (typically because its owning module is visible and we know that + /// modules cannot later become hidden in this compilation). + /// After serialization and deserialization, this will be converted + /// to VisibleWhenImported. + Visible, + /// This declaration has an owning module, and is visible when that + /// module is imported. + VisibleWhenImported, + /// This declaration has an owning module, but is only visible to + /// lookups that occur within that module. + ModulePrivate }; - + +protected: /// \brief The next declaration within the same lexical /// DeclContext. These pointers form the linked list that is /// traversed via DeclContext's decls_begin()/decls_end(). /// - /// The extra two bits are used for the TopLevelDeclInObjCContainer and - /// ModulePrivate bits. - llvm::PointerIntPair NextInContextAndBits; + /// The extra two bits are used for the ModuleOwnershipKind. + llvm::PointerIntPair NextInContextAndBits; private: friend class DeclContext; @@ -282,6 +289,11 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// are regarded as "referenced" but not "used". unsigned Referenced : 1; + /// \brief Whether this declaration is a top-level declaration (function, + /// global variable, etc.) that is lexically inside an objc container + /// definition. + unsigned TopLevelDeclInObjCContainer : 1; + /// \brief Whether statistic collection is enabled. static bool StatisticsEnabled; @@ -294,11 +306,6 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Whether this declaration was loaded from an AST file. unsigned FromASTFile : 1; - /// \brief Whether this declaration is hidden from normal name lookup, e.g., - /// because it is was loaded from an AST file is either module-private or - /// because its submodule has not been made visible. - unsigned Hidden : 1; - /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. unsigned IdentifierNamespace : 13; @@ -332,26 +339,38 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu private: bool AccessDeclContextSanity() const; + /// Get the module ownership kind to use for a local lexical child of \p DC, + /// which may be either a local or (rarely) an imported declaration. + static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) { + if (DC) { + auto *D = cast(DC); + auto MOK = D->getModuleOwnershipKind(); + if (MOK != ModuleOwnershipKind::Unowned && + (!D->isFromASTFile() || D->hasLocalOwningModuleStorage())) + return MOK; + // If D is not local and we have no local module storage, then we don't + // need to track module ownership at all. + } + return ModuleOwnershipKind::Unowned; + } + protected: Decl(Kind DK, DeclContext *DC, SourceLocation L) - : NextInContextAndBits(), DeclCtx(DC), Loc(L), DeclKind(DK), - InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), - Referenced(false), Access(AS_none), FromASTFile(0), - Hidden(DC && cast(DC)->Hidden && - (!cast(DC)->isFromASTFile() || - hasLocalOwningModuleStorage())), + : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)), + DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(0), HasAttrs(false), + Implicit(false), Used(false), Referenced(false), + TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0), IdentifierNamespace(getIdentifierNamespaceForKind(DK)), CacheValidAndLinkage(0) { if (StatisticsEnabled) add(DK); } Decl(Kind DK, EmptyShell Empty) - : NextInContextAndBits(), DeclKind(DK), InvalidDecl(0), - HasAttrs(false), Implicit(false), Used(false), Referenced(false), - Access(AS_none), FromASTFile(0), Hidden(0), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)), - CacheValidAndLinkage(0) - { + : NextInContextAndBits(), DeclKind(DK), InvalidDecl(0), HasAttrs(false), + Implicit(false), Used(false), Referenced(false), + TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0), + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + CacheValidAndLinkage(0) { if (StatisticsEnabled) add(DK); } @@ -551,16 +570,11 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// global variable, etc.) that is lexically inside an objc container /// definition. bool isTopLevelDeclInObjCContainer() const { - return NextInContextAndBits.getInt() & TopLevelDeclInObjCContainerFlag; + return TopLevelDeclInObjCContainer; } void setTopLevelDeclInObjCContainer(bool V = true) { - unsigned Bits = NextInContextAndBits.getInt(); - if (V) - Bits |= TopLevelDeclInObjCContainerFlag; - else - Bits &= ~TopLevelDeclInObjCContainerFlag; - NextInContextAndBits.setInt(Bits); + TopLevelDeclInObjCContainer = V; } /// \brief Looks on this and related declarations for an applicable @@ -570,7 +584,7 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Whether this declaration was marked as being private to the /// module in which it was defined. bool isModulePrivate() const { - return NextInContextAndBits.getInt() & ModulePrivateFlag; + return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate; } /// \brief Whether this declaration is exported (by virtue of being lexically @@ -585,15 +599,14 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu const Attr *getDefiningAttr() const; protected: - /// \brief Specify whether this declaration was marked as being private + /// \brief Specify that this declaration was marked as being private /// to the module in which it was defined. - void setModulePrivate(bool MP = true) { - unsigned Bits = NextInContextAndBits.getInt(); - if (MP) - Bits |= ModulePrivateFlag; - else - Bits &= ~ModulePrivateFlag; - NextInContextAndBits.setInt(Bits); + void setModulePrivate() { + // The module-private specifier has no effect on unowned declarations. + // FIXME: We should track this in some way for source fidelity. + if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned) + return; + setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate); } /// \brief Set the owning module ID. @@ -692,7 +705,7 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Get the imported owning module, if this decl is from an imported /// (non-local) module. Module *getImportedOwningModule() const { - if (!isFromASTFile()) + if (!isFromASTFile() || !hasOwningModule()) return nullptr; return getOwningModuleSlow(); @@ -701,31 +714,57 @@ class LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) Decl { (pu /// \brief Get the local owning module, if known. Returns nullptr if owner is /// not yet known or declaration is not from a module. Module *getLocalOwningModule() const { - if (isFromASTFile() || !Hidden) + if (isFromASTFile() || !hasOwningModule()) return nullptr; assert(hasLocalOwningModuleStorage() && - "hidden local decl but no local module storage"); + "owned local decl but no local module storage"); return reinterpret_cast(this)[-1]; } void setLocalOwningModule(Module *M) { - assert(!isFromASTFile() && Hidden && hasLocalOwningModuleStorage() && + assert(!isFromASTFile() && hasOwningModule() && + hasLocalOwningModuleStorage() && "should not have a cached owning module"); reinterpret_cast(this)[-1] = M; } + /// Is this declaration owned by some module? + bool hasOwningModule() const { + return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned; + } + + /// Get the module that owns this declaration. Module *getOwningModule() const { return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule(); } - /// \brief Determine whether this declaration is hidden from name lookup. - bool isHidden() const { return Hidden; } + /// \brief Determine whether this declaration might be hidden from name + /// lookup. Note that the declaration might be visible even if this returns + /// \c false, if the owning module is visible within the query context. + // FIXME: Rename this to make it clearer what it does. + bool isHidden() const { + return (int)getModuleOwnershipKind() > (int)ModuleOwnershipKind::Visible; + } + /// Set that this declaration is globally visible, even if it came from a + /// module that is not visible. + void setVisibleDespiteOwningModule() { + if (hasOwningModule()) + setModuleOwnershipKind(ModuleOwnershipKind::Visible); + } + + /// \brief Get the kind of module ownership for this declaration. + ModuleOwnershipKind getModuleOwnershipKind() const { + return NextInContextAndBits.getInt(); + } + /// \brief Set whether this declaration is hidden from name lookup. - void setHidden(bool Hide) { - assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && - "declaration with no owning module can't be hidden"); - Hidden = Hide; + void setModuleOwnershipKind(ModuleOwnershipKind MOK) { + assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned && + MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() && + !hasLocalOwningModuleStorage()) && + "no storage available for owning module for this declaration"); + NextInContextAndBits.setInt(MOK); } unsigned getIdentifierNamespace() const { Modified: vendor/clang/dist/include/clang/Analysis/CloneDetection.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/CloneDetection.h Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/Analysis/CloneDetection.h Mon Jun 26 20:33:12 2017 (r320376) @@ -17,6 +17,8 @@ #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Regex.h" #include namespace clang { @@ -317,6 +319,26 @@ class MinGroupSizeConstraint { (public) /// Ensures that no clone group fully contains another clone group. struct OnlyLargestCloneConstraint { void constrain(std::vector &Result); +}; + +struct FilenamePatternConstraint { + StringRef IgnoredFilesPattern; + std::shared_ptr IgnoredFilesRegex; + + FilenamePatternConstraint(StringRef IgnoredFilesPattern) + : IgnoredFilesPattern(IgnoredFilesPattern) { + IgnoredFilesRegex = std::make_shared("^(" + + IgnoredFilesPattern.str() + "$)"); + } + + bool isAutoGenerated(const CloneDetector::CloneGroup &Group); + + void constrain(std::vector &CloneGroups) { + CloneConstraint::filterGroups( + CloneGroups, [this](const CloneDetector::CloneGroup &Group) { + return isAutoGenerated(Group); + }); + } }; /// Analyzes the pattern of the referenced variables in a statement. Modified: vendor/clang/dist/include/clang/Basic/Builtins.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/Builtins.def Mon Jun 26 20:33:01 2017 (r320375) +++ vendor/clang/dist/include/clang/Basic/Builtins.def Mon Jun 26 20:33:12 2017 (r320376) @@ -52,6 +52,7 @@ // LL -> long long // LLL -> __int128_t (e.g. LLLi) // W -> int64_t +// N -> 'int' size if target is LP64, 'L' otherwise. // S -> signed // U -> unsigned // I -> Required to constant fold to an integer constant expression. @@ -718,11 +719,11 @@ BUILTIN(__builtin_rindex, "c*cC*i", "Fn") LANGBUILTIN(_alloca, "v*z", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__assume, "vb", "n", ALL_MS_LANGUAGES) LIBBUILTIN(_byteswap_ushort, "UsUs", "fnc", "stdlib.h", ALL_MS_LANGUAGES) -LIBBUILTIN(_byteswap_ulong, "ULiULi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) +LIBBUILTIN(_byteswap_ulong, "UNiUNi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) LIBBUILTIN(_byteswap_uint64, "ULLiULLi", "fnc", "stdlib.h", ALL_MS_LANGUAGES) LANGBUILTIN(__debugbreak, "v", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(__exception_code, "ULi", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_exception_code, "ULi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(__exception_code, "UNi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_exception_code, "UNi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__exception_info, "v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_exception_info, "v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__abnormal_termination, "i", "n", ALL_MS_LANGUAGES) @@ -730,33 +731,33 @@ LANGBUILTIN(_abnormal_termination, "i", "n", ALL_MS_L LANGBUILTIN(__GetExceptionInfo, "v*.", "ntu", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedAnd8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedAnd16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedAnd, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedAnd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange8, "ccD*cc", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange16, "ssD*ss", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedCompareExchange, "LiLiD*LiLi", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedCompareExchange, "NiNiD*NiNi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchange64, "LLiLLiD*LLiLLi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedCompareExchangePointer, "v*v*D*v*v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedDecrement16, "ssD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedDecrement, "LiLiD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchange, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedDecrement, "NiNiD*", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchange, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchange8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchange16, "ssD*s", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeAdd8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeAdd16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchangeAdd, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchangeAdd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangePointer, "v*v*D*v*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeSub8, "ccD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedExchangeSub16, "ssD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedExchangeSub, "LiLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(_InterlockedExchangeSub, "NiNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_InterlockedIncrement16, "ssD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(_InterlockedIncrement, "LiLiD*", "n", ALL_MS_LANGUAGES) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:20 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40BEAD91353; Mon, 26 Jun 2017 20:33:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF7164D94; Mon, 26 Jun 2017 20:33:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXJRS098835; Mon, 26 Jun 2017 20:33:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXJXn098834; Mon, 26 Jun 2017 20:33:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXJXn098834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320377 - vendor/clang/clang-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:20 -0000 Author: dim Date: Mon Jun 26 20:33:18 2017 New Revision: 320377 URL: https://svnweb.freebsd.org/changeset/base/320377 Log: Tag clang trunk r306325. Added: vendor/clang/clang-trunk-r306325/ - copied from r320376, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:26 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25EC7D913A8; Mon, 26 Jun 2017 20:33:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB12F64E23; Mon, 26 Jun 2017 20:33:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXOG0098912; Mon, 26 Jun 2017 20:33:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXMpm098882; Mon, 26 Jun 2017 20:33:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXMpm098882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320378 - in vendor/compiler-rt/dist: . cmake include/xray lib/asan lib/asan/scripts lib/interception lib/interception/tests lib/lsan lib/msan lib/sanitizer_common lib/sanitizer_common/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:26 -0000 Author: dim Date: Mon Jun 26 20:33:22 2017 New Revision: 320378 URL: https://svnweb.freebsd.org/changeset/base/320378 Log: Vendor import of compiler-rt trunk r306325: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306325 Added: vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/pr33372.cc (contents, props changed) vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/ vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/dispatch.mm vendor/compiler-rt/dist/test/lsan/TestCases/Darwin/lit.local.cfg vendor/compiler-rt/dist/test/profile/Linux/counter_promo_for.c (contents, props changed) vendor/compiler-rt/dist/test/profile/Linux/counter_promo_while.c (contents, props changed) vendor/compiler-rt/dist/test/xray/TestCases/Linux/arg1-arg0-logging.cc (contents, props changed) Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/include/xray/xray_interface.h vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist/lib/asan/weak_symbols.txt vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt vendor/compiler-rt/dist/lib/lsan/lsan.h vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc vendor/compiler-rt/dist/lib/lsan/lsan_thread.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang_other.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h vendor/compiler-rt/dist/lib/scudo/scudo_allocator_secondary.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc vendor/compiler-rt/dist/lib/xray/xray_interface.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/allocator_oom_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/preinstalled_signal.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/oom.cc vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/esan/TestCases/workingset-midreport.cpp vendor/compiler-rt/dist/test/esan/TestCases/workingset-samples.cpp vendor/compiler-rt/dist/test/esan/TestCases/workingset-simple.cpp vendor/compiler-rt/dist/test/lsan/lit.common.cfg vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc vendor/compiler-rt/dist/test/scudo/random_shuffle.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nonnull.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/nullability.c Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/CMakeLists.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -7,13 +7,13 @@ # An important constraint of the build is that it only produces libraries # based on the ability of the host toolchain to target various platforms. +cmake_minimum_required(VERSION 3.4.3) + # Check if compiler-rt is built as a standalone project. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) project(CompilerRT C CXX ASM) set(COMPILER_RT_STANDALONE_BUILD TRUE) endif() - -cmake_minimum_required(VERSION 3.4.3) # Add path for custom compiler-rt modules. list(INSERT CMAKE_MODULE_PATH 0 Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Mon Jun 26 20:33:22 2017 (r320378) @@ -179,7 +179,7 @@ set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64}) set(ALL_ESAN_SUPPORTED_ARCH ${X86_64} ${MIPS64}) -set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}) +set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}) set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} powerpc64le) if(APPLE) Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/xray/xray_interface.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/include/xray/xray_interface.h Mon Jun 26 20:33:22 2017 (r320378) @@ -60,7 +60,8 @@ extern int __xray_remove_handler(); /// start logging their subsequent affected function calls (if patched). /// /// Returns 1 on success, 0 on error. -extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t)); +extern int __xray_set_handler_arg1(void (*entry)(int32_t, XRayEntryType, + uint64_t)); /// Disables the XRay handler used to log first arguments of function calls. /// Returns 1 on success, 0 on error. Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -160,7 +160,7 @@ struct QuarantineCallback { } void *Allocate(uptr size) { - return get_allocator().Allocate(cache_, size, 1, false); + return get_allocator().Allocate(cache_, size, 1); } void Deallocate(void *p) { @@ -266,7 +266,8 @@ struct Allocator { } void Initialize(const AllocatorOptions &options) { - allocator.Init(options.may_return_null, options.release_to_os_interval_ms); + SetAllocatorMayReturnNull(options.may_return_null); + allocator.Init(options.release_to_os_interval_ms); SharedInitCode(options); } @@ -302,7 +303,7 @@ struct Allocator { } void ReInitialize(const AllocatorOptions &options) { - allocator.SetMayReturnNull(options.may_return_null); + SetAllocatorMayReturnNull(options.may_return_null); allocator.SetReleaseToOSIntervalMs(options.release_to_os_interval_ms); SharedInitCode(options); @@ -323,7 +324,7 @@ struct Allocator { options->thread_local_quarantine_size_kb = quarantine.GetCacheSize() >> 10; options->min_redzone = atomic_load(&min_redzone, memory_order_acquire); options->max_redzone = atomic_load(&max_redzone, memory_order_acquire); - options->may_return_null = allocator.MayReturnNull(); + options->may_return_null = AllocatorMayReturnNull(); options->alloc_dealloc_mismatch = atomic_load(&alloc_dealloc_mismatch, memory_order_acquire); options->release_to_os_interval_ms = allocator.ReleaseToOSIntervalMs(); @@ -374,7 +375,7 @@ struct Allocator { if (UNLIKELY(!asan_inited)) AsanInitFromRtl(); if (RssLimitExceeded()) - return allocator.ReturnNullOrDieOnOOM(); + return AsanAllocator::FailureHandler::OnOOM(); Flags &fl = *flags(); CHECK(stack); const uptr min_alignment = SHADOW_GRANULARITY; @@ -407,24 +408,22 @@ struct Allocator { if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize) { Report("WARNING: AddressSanitizer failed to allocate 0x%zx bytes\n", (void*)size); - return allocator.ReturnNullOrDieOnBadRequest(); + return AsanAllocator::FailureHandler::OnBadRequest(); } AsanThread *t = GetCurrentThread(); void *allocated; if (t) { AllocatorCache *cache = GetAllocatorCache(&t->malloc_storage()); - allocated = - allocator.Allocate(cache, needed_size, 8, false); + allocated = allocator.Allocate(cache, needed_size, 8); } else { SpinMutexLock l(&fallback_mutex); AllocatorCache *cache = &fallback_allocator_cache; - allocated = - allocator.Allocate(cache, needed_size, 8, false); + allocated = allocator.Allocate(cache, needed_size, 8); } + if (!allocated) + return nullptr; - if (!allocated) return allocator.ReturnNullOrDieOnOOM(); - if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) { // Heap poisoning is enabled, but the allocator provides an unpoisoned // chunk. This is possible if CanPoisonMemory() was false for some @@ -634,7 +633,7 @@ struct Allocator { void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) { if (CallocShouldReturnNullDueToOverflow(size, nmemb)) - return allocator.ReturnNullOrDieOnBadRequest(); + return AsanAllocator::FailureHandler::OnBadRequest(); void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false); // If the memory comes from the secondary allocator no need to clear it // as it comes directly from mmap. Modified: vendor/compiler-rt/dist/lib/asan/asan_report.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -204,6 +204,14 @@ class ScopedInErrorReport { error_report_callback(buffer_copy.data()); } + if (halt_on_error_ && common_flags()->abort_on_error) { + // On Android the message is truncated to 512 characters. + // FIXME: implement "compact" error format, possibly without, or with + // highly compressed stack traces? + // FIXME: or just use the summary line as abort message? + SetAbortMessage(buffer_copy.data()); + } + // In halt_on_error = false mode, reset the current error object (before // unlocking). if (!halt_on_error_) Modified: vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup ============================================================================== --- vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon Jun 26 20:33:22 2017 (r320378) @@ -410,15 +410,15 @@ if ! ( cd "$TMPDIRBASE" && diff -qr old/ new/ ) ; then install "$TMPDIR/asanwrapper" /system/bin 755 install "$TMPDIR/asanwrapper64" /system/bin 755 - adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK - adb_shell ln -s $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK else install "$TMPDIR/$ASAN_RT" /system/lib 644 install "$TMPDIR/app_process32" /system/bin 755 $CTX install "$TMPDIR/app_process.wrap" /system/bin 755 $CTX install "$TMPDIR/asanwrapper" /system/bin 755 $CTX - adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK + adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK adb_shell rm /system/bin/app_process adb_shell ln -s /system/bin/app_process.wrap /system/bin/app_process Modified: vendor/compiler-rt/dist/lib/asan/weak_symbols.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/weak_symbols.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/asan/weak_symbols.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -1,3 +1,12 @@ ___asan_default_options ___asan_default_suppressions ___asan_on_error +___asan_set_shadow_00 +___asan_set_shadow_f1 +___asan_set_shadow_f2 +___asan_set_shadow_f3 +___asan_set_shadow_f4 +___asan_set_shadow_f5 +___asan_set_shadow_f6 +___asan_set_shadow_f7 +___asan_set_shadow_f8 Modified: vendor/compiler-rt/dist/lib/interception/interception_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/interception/interception_win.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/interception/interception_win.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -477,7 +477,7 @@ static size_t GetInstructionSize(uptr address, size_t* switch (*(u8*)address) { case 0xA1: // A1 XX XX XX XX XX XX XX XX : // movabs eax, dword ptr ds:[XXXXXXXX] - return 8; + return 9; } switch (*(u16*)address) { @@ -495,6 +495,11 @@ static size_t GetInstructionSize(uptr address, size_t* case 0x5741: // push r15 case 0x9066: // Two-byte NOP return 2; + + case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX] + if (rel_offset) + *rel_offset = 2; + return 6; } switch (0x00FFFFFF & *(u32*)address) { Modified: vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/interception/tests/interception_win_test.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -170,6 +170,13 @@ const u8 kPatchableCode5[] = { 0x54, // push esp }; +#if SANITIZER_WINDOWS64 +u8 kLoadGlobalCode[] = { + 0x8B, 0x05, 0x00, 0x00, 0x00, 0x00, // mov eax [rip + global] + 0xC3, // ret +}; +#endif + const u8 kUnpatchableCode1[] = { 0xC3, // ret }; @@ -501,6 +508,10 @@ TEST(Interception, PatchableFunction) { #endif EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override)); EXPECT_TRUE(TestFunctionPatching(kPatchableCode5, override)); + +#if SANITIZER_WINDOWS64 + EXPECT_TRUE(TestFunctionPatching(kLoadGlobalCode, override)); +#endif EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override)); EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override)); Modified: vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jun 26 20:33:22 2017 (r320378) @@ -13,6 +13,7 @@ set(LSAN_SOURCES lsan_allocator.cc lsan_linux.cc lsan_interceptors.cc + lsan_mac.cc lsan_malloc_mac.cc lsan_preinit.cc lsan_thread.cc) Modified: vendor/compiler-rt/dist/lib/lsan/lsan.h ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan.h Mon Jun 26 20:33:22 2017 (r320378) @@ -38,6 +38,8 @@ GET_STACK_TRACE(__sanitizer::common_flags()->malloc_context_size, \ common_flags()->fast_unwind_on_malloc) +#define GET_STACK_TRACE_THREAD GET_STACK_TRACE(kStackTraceMax, true) + namespace __lsan { void InitializeInterceptors(); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -38,8 +38,8 @@ typedef CombinedAllocatorallocator_may_return_null); allocator.InitLinkerInitialized( - common_flags()->allocator_may_return_null, common_flags()->allocator_release_to_os_interval_ms); } @@ -76,7 +76,7 @@ void *Allocate(const StackTrace &stack, uptr size, upt Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", size); return nullptr; } - void *p = allocator.Allocate(GetAllocatorCache(), size, alignment, false); + void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); // Do not rely on the allocator to clear the memory (it's slow). if (cleared && allocator.FromPrimary(p)) memset(p, 0, size); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -79,8 +79,7 @@ void EnableInThisThread() { u32 GetCurrentThread() { thread_local_data_t *data = get_tls_val(false); - CHECK(data); - return data->current_thread_id; + return data ? data->current_thread_id : kInvalidTid; } void SetCurrentThread(u32 tid) { get_tls_val(true)->current_thread_id = tid; } Added: vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/lsan/lsan_mac.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -0,0 +1,192 @@ +//===-- lsan_mac.cc -------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of LeakSanitizer, a memory leak checker. +// +// Mac-specific details. +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_platform.h" +#if SANITIZER_MAC + +#include "interception/interception.h" +#include "lsan.h" +#include "lsan_allocator.h" +#include "lsan_thread.h" + +#include + +namespace __lsan { +// Support for the following functions from libdispatch on Mac OS: +// dispatch_async_f() +// dispatch_async() +// dispatch_sync_f() +// dispatch_sync() +// dispatch_after_f() +// dispatch_after() +// dispatch_group_async_f() +// dispatch_group_async() +// TODO(glider): libdispatch API contains other functions that we don't support +// yet. +// +// dispatch_sync() and dispatch_sync_f() are synchronous, although chances are +// they can cause jobs to run on a thread different from the current one. +// TODO(glider): if so, we need a test for this (otherwise we should remove +// them). +// +// The following functions use dispatch_barrier_async_f() (which isn't a library +// function but is exported) and are thus supported: +// dispatch_source_set_cancel_handler_f() +// dispatch_source_set_cancel_handler() +// dispatch_source_set_event_handler_f() +// dispatch_source_set_event_handler() +// +// The reference manual for Grand Central Dispatch is available at +// http://developer.apple.com/library/mac/#documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html +// The implementation details are at +// http://libdispatch.macosforge.org/trac/browser/trunk/src/queue.c + +typedef void *dispatch_group_t; +typedef void *dispatch_queue_t; +typedef void *dispatch_source_t; +typedef u64 dispatch_time_t; +typedef void (*dispatch_function_t)(void *block); +typedef void *(*worker_t)(void *block); + +// A wrapper for the ObjC blocks used to support libdispatch. +typedef struct { + void *block; + dispatch_function_t func; + u32 parent_tid; +} lsan_block_context_t; + +ALWAYS_INLINE +void lsan_register_worker_thread(int parent_tid) { + if (GetCurrentThread() == kInvalidTid) { + u32 tid = ThreadCreate(parent_tid, 0, true); + ThreadStart(tid, GetTid()); + SetCurrentThread(tid); + } +} + +// For use by only those functions that allocated the context via +// alloc_lsan_context(). +extern "C" void lsan_dispatch_call_block_and_release(void *block) { + lsan_block_context_t *context = (lsan_block_context_t *)block; + VReport(2, + "lsan_dispatch_call_block_and_release(): " + "context: %p, pthread_self: %p\n", + block, pthread_self()); + lsan_register_worker_thread(context->parent_tid); + // Call the original dispatcher for the block. + context->func(context->block); + lsan_free(context); +} + +} // namespace __lsan + +using namespace __lsan; // NOLINT + +// Wrap |ctxt| and |func| into an lsan_block_context_t. +// The caller retains control of the allocated context. +extern "C" lsan_block_context_t *alloc_lsan_context(void *ctxt, + dispatch_function_t func) { + GET_STACK_TRACE_THREAD; + lsan_block_context_t *lsan_ctxt = + (lsan_block_context_t *)lsan_malloc(sizeof(lsan_block_context_t), stack); + lsan_ctxt->block = ctxt; + lsan_ctxt->func = func; + lsan_ctxt->parent_tid = GetCurrentThread(); + return lsan_ctxt; +} + +// Define interceptor for dispatch_*_f function with the three most common +// parameters: dispatch_queue_t, context, dispatch_function_t. +#define INTERCEPT_DISPATCH_X_F_3(dispatch_x_f) \ + INTERCEPTOR(void, dispatch_x_f, dispatch_queue_t dq, void *ctxt, \ + dispatch_function_t func) { \ + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); \ + return REAL(dispatch_x_f)(dq, (void *)lsan_ctxt, \ + lsan_dispatch_call_block_and_release); \ + } + +INTERCEPT_DISPATCH_X_F_3(dispatch_async_f) +INTERCEPT_DISPATCH_X_F_3(dispatch_sync_f) +INTERCEPT_DISPATCH_X_F_3(dispatch_barrier_async_f) + +INTERCEPTOR(void, dispatch_after_f, dispatch_time_t when, dispatch_queue_t dq, + void *ctxt, dispatch_function_t func) { + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); + return REAL(dispatch_after_f)(when, dq, (void *)lsan_ctxt, + lsan_dispatch_call_block_and_release); +} + +INTERCEPTOR(void, dispatch_group_async_f, dispatch_group_t group, + dispatch_queue_t dq, void *ctxt, dispatch_function_t func) { + lsan_block_context_t *lsan_ctxt = alloc_lsan_context(ctxt, func); + REAL(dispatch_group_async_f) + (group, dq, (void *)lsan_ctxt, lsan_dispatch_call_block_and_release); +} + +#if !defined(MISSING_BLOCKS_SUPPORT) +extern "C" { +void dispatch_async(dispatch_queue_t dq, void (^work)(void)); +void dispatch_group_async(dispatch_group_t dg, dispatch_queue_t dq, + void (^work)(void)); +void dispatch_after(dispatch_time_t when, dispatch_queue_t queue, + void (^work)(void)); +void dispatch_source_set_cancel_handler(dispatch_source_t ds, + void (^work)(void)); +void dispatch_source_set_event_handler(dispatch_source_t ds, + void (^work)(void)); +} + +#define GET_LSAN_BLOCK(work) \ + void (^lsan_block)(void); \ + int parent_tid = GetCurrentThread(); \ + lsan_block = ^(void) { \ + lsan_register_worker_thread(parent_tid); \ + work(); \ + } + +INTERCEPTOR(void, dispatch_async, dispatch_queue_t dq, void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_async)(dq, lsan_block); +} + +INTERCEPTOR(void, dispatch_group_async, dispatch_group_t dg, + dispatch_queue_t dq, void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_group_async)(dg, dq, lsan_block); +} + +INTERCEPTOR(void, dispatch_after, dispatch_time_t when, dispatch_queue_t queue, + void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_after)(when, queue, lsan_block); +} + +INTERCEPTOR(void, dispatch_source_set_cancel_handler, dispatch_source_t ds, + void (^work)(void)) { + if (!work) { + REAL(dispatch_source_set_cancel_handler)(ds, work); + return; + } + GET_LSAN_BLOCK(work); + REAL(dispatch_source_set_cancel_handler)(ds, lsan_block); +} + +INTERCEPTOR(void, dispatch_source_set_event_handler, dispatch_source_t ds, + void (^work)(void)) { + GET_LSAN_BLOCK(work); + REAL(dispatch_source_set_event_handler)(ds, lsan_block); +} +#endif + +#endif // SANITIZER_MAC Modified: vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_thread.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -77,7 +77,7 @@ u32 ThreadCreate(u32 parent_tid, uptr user_id, bool de /* arg */ nullptr); } -void ThreadStart(u32 tid, tid_t os_id) { +void ThreadStart(u32 tid, tid_t os_id, bool workerthread) { OnStartedArgs args; uptr stack_size = 0; uptr tls_size = 0; @@ -87,7 +87,7 @@ void ThreadStart(u32 tid, tid_t os_id) { args.tls_end = args.tls_begin + tls_size; GetAllocatorCacheRange(&args.cache_begin, &args.cache_end); args.dtls = DTLS_Get(); - thread_registry->StartThread(tid, os_id, /*workerthread*/ false, &args); + thread_registry->StartThread(tid, os_id, workerthread, &args); } void ThreadFinish() { Modified: vendor/compiler-rt/dist/lib/lsan/lsan_thread.h ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_thread.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/lsan/lsan_thread.h Mon Jun 26 20:33:22 2017 (r320378) @@ -45,7 +45,7 @@ class ThreadContext : public ThreadContextBase { void InitializeThreadRegistry(); -void ThreadStart(u32 tid, tid_t os_id); +void ThreadStart(u32 tid, tid_t os_id, bool workerthread = false); void ThreadFinish(); u32 ThreadCreate(u32 tid, uptr uid, bool detached); void ThreadJoin(u32 tid); Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -119,9 +119,8 @@ static AllocatorCache fallback_allocator_cache; static SpinMutex fallback_mutex; void MsanAllocatorInit() { - allocator.Init( - common_flags()->allocator_may_return_null, - common_flags()->allocator_release_to_os_interval_ms); + SetAllocatorMayReturnNull(common_flags()->allocator_may_return_null); + allocator.Init(common_flags()->allocator_release_to_os_interval_ms); } AllocatorCache *GetAllocatorCache(MsanThreadLocalMallocStorage *ms) { @@ -139,17 +138,17 @@ static void *MsanAllocate(StackTrace *stack, uptr size if (size > kMaxAllowedMallocSize) { Report("WARNING: MemorySanitizer failed to allocate %p bytes\n", (void *)size); - return allocator.ReturnNullOrDieOnBadRequest(); + return Allocator::FailureHandler::OnBadRequest(); } MsanThread *t = GetCurrentThread(); void *allocated; if (t) { AllocatorCache *cache = GetAllocatorCache(&t->malloc_storage()); - allocated = allocator.Allocate(cache, size, alignment, false); + allocated = allocator.Allocate(cache, size, alignment); } else { SpinMutexLock l(&fallback_mutex); AllocatorCache *cache = &fallback_allocator_cache; - allocated = allocator.Allocate(cache, size, alignment, false); + allocated = allocator.Allocate(cache, size, alignment); } Metadata *meta = reinterpret_cast(allocator.GetMetaData(allocated)); @@ -197,7 +196,7 @@ void MsanDeallocate(StackTrace *stack, void *p) { void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { if (CallocShouldReturnNullDueToOverflow(size, nmemb)) - return allocator.ReturnNullOrDieOnBadRequest(); + return Allocator::FailureHandler::OnBadRequest(); return MsanReallocate(stack, nullptr, nmemb * size, sizeof(u64), true); } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc Mon Jun 26 20:33:22 2017 (r320378) @@ -94,8 +94,7 @@ InternalAllocator *internal_allocator() { SpinMutexLock l(&internal_alloc_init_mu); if (atomic_load(&internal_allocator_initialized, memory_order_relaxed) == 0) { - internal_allocator_instance->Init( - /* may_return_null */ false, kReleaseToOSIntervalNever); + internal_allocator_instance->Init(kReleaseToOSIntervalNever); atomic_store(&internal_allocator_initialized, 1, memory_order_release); } } @@ -108,9 +107,9 @@ static void *RawInternalAlloc(uptr size, InternalAlloc if (cache == 0) { SpinMutexLock l(&internal_allocator_cache_mu); return internal_allocator()->Allocate(&internal_allocator_cache, size, - alignment, false); + alignment); } - return internal_allocator()->Allocate(cache, size, alignment, false); + return internal_allocator()->Allocate(cache, size, alignment); } static void *RawInternalRealloc(void *ptr, uptr size, @@ -162,7 +161,7 @@ void *InternalRealloc(void *addr, uptr size, InternalA void *InternalCalloc(uptr count, uptr size, InternalAllocatorCache *cache) { if (CallocShouldReturnNullDueToOverflow(count, size)) - return internal_allocator()->ReturnNullOrDieOnBadRequest(); + return InternalAllocator::FailureHandler::OnBadRequest(); void *p = InternalAlloc(count * size, cache); if (p) internal_memset(p, 0, count * size); return p; @@ -209,17 +208,51 @@ bool CallocShouldReturnNullDueToOverflow(uptr size, up return (max / size) < n; } -static atomic_uint8_t reporting_out_of_memory = {0}; +static atomic_uint8_t allocator_out_of_memory = {0}; +static atomic_uint8_t allocator_may_return_null = {0}; -bool IsReportingOOM() { return atomic_load_relaxed(&reporting_out_of_memory); } +bool IsAllocatorOutOfMemory() { + return atomic_load_relaxed(&allocator_out_of_memory); +} -void NORETURN ReportAllocatorCannotReturnNull(bool out_of_memory) { - if (out_of_memory) atomic_store_relaxed(&reporting_out_of_memory, 1); +// Prints error message and kills the program. +void NORETURN ReportAllocatorCannotReturnNull() { Report("%s's allocator is terminating the process instead of returning 0\n", SanitizerToolName); Report("If you don't like this behavior set allocator_may_return_null=1\n"); CHECK(0); Die(); +} + +bool AllocatorMayReturnNull() { + return atomic_load(&allocator_may_return_null, memory_order_relaxed); +} + +void SetAllocatorMayReturnNull(bool may_return_null) { + atomic_store(&allocator_may_return_null, may_return_null, + memory_order_relaxed); +} + +void *ReturnNullOrDieOnFailure::OnBadRequest() { + if (AllocatorMayReturnNull()) + return nullptr; + ReportAllocatorCannotReturnNull(); +} + +void *ReturnNullOrDieOnFailure::OnOOM() { + atomic_store_relaxed(&allocator_out_of_memory, 1); + if (AllocatorMayReturnNull()) + return nullptr; + ReportAllocatorCannotReturnNull(); +} + +void *DieOnFailure::OnBadRequest() { + ReportAllocatorCannotReturnNull(); +} + +void *DieOnFailure::OnOOM() { + atomic_store_relaxed(&allocator_out_of_memory, 1); + ReportAllocatorCannotReturnNull(); } } // namespace __sanitizer Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,12 +24,28 @@ namespace __sanitizer { -// Returns true if ReportAllocatorCannotReturnNull(true) was called. -// Can be use to avoid memory hungry operations. -bool IsReportingOOM(); +// Since flags are immutable and allocator behavior can be changed at runtime +// (unit tests or ASan on Android are some examples), allocator_may_return_null +// flag value is cached here and can be altered later. +bool AllocatorMayReturnNull(); +void SetAllocatorMayReturnNull(bool may_return_null); -// Prints error message and kills the program. -void NORETURN ReportAllocatorCannotReturnNull(bool out_of_memory); +// Allocator failure handling policies: +// Implements AllocatorMayReturnNull policy, returns null when the flag is set, +// dies otherwise. +struct ReturnNullOrDieOnFailure { + static void *OnBadRequest(); + static void *OnOOM(); +}; +// Always dies on the failure. +struct DieOnFailure { + static void *OnBadRequest(); + static void *OnOOM(); +}; + +// Returns true if allocator detected OOM condition. Can be used to avoid memory +// hungry operations. Set when AllocatorReturnNullOrDieOnOOM() is called. +bool IsAllocatorOutOfMemory(); // Allocators call these callbacks on mmap/munmap. struct NoOpMapUnmapCallback { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_combined.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,31 +24,26 @@ template // NOLINT class CombinedAllocator { public: - void InitCommon(bool may_return_null, s32 release_to_os_interval_ms) { - primary_.Init(release_to_os_interval_ms); - atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); - } + typedef typename SecondaryAllocator::FailureHandler FailureHandler; - void InitLinkerInitialized( - bool may_return_null, s32 release_to_os_interval_ms) { - secondary_.InitLinkerInitialized(may_return_null); + void InitLinkerInitialized(s32 release_to_os_interval_ms) { + primary_.Init(release_to_os_interval_ms); + secondary_.InitLinkerInitialized(); stats_.InitLinkerInitialized(); - InitCommon(may_return_null, release_to_os_interval_ms); } - void Init(bool may_return_null, s32 release_to_os_interval_ms) { - secondary_.Init(may_return_null); + void Init(s32 release_to_os_interval_ms) { + primary_.Init(release_to_os_interval_ms); + secondary_.Init(); stats_.Init(); - InitCommon(may_return_null, release_to_os_interval_ms); } - void *Allocate(AllocatorCache *cache, uptr size, uptr alignment, - bool cleared = false) { + void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) { // Returning 0 on malloc(0) may break a lot of code. if (size == 0) size = 1; if (size + alignment < size) - return ReturnNullOrDieOnBadRequest(); + return FailureHandler::OnBadRequest(); uptr original_size = size; // If alignment requirements are to be fulfilled by the frontend allocator // rather than by the primary or secondary, passing an alignment lower than @@ -56,49 +51,24 @@ class CombinedAllocator { // alignment check. if (alignment > 8) size = RoundUpTo(size, alignment); - void *res; - bool from_primary = primary_.CanAllocate(size, alignment); // The primary allocator should return a 2^x aligned allocation when // requested 2^x bytes, hence using the rounded up 'size' when being // serviced by the primary (this is no longer true when the primary is // using a non-fixed base address). The secondary takes care of the // alignment without such requirement, and allocating 'size' would use // extraneous memory, so we employ 'original_size'. - if (from_primary) + void *res; + if (primary_.CanAllocate(size, alignment)) res = cache->Allocate(&primary_, primary_.ClassID(size)); else res = secondary_.Allocate(&stats_, original_size, alignment); + if (!res) + return FailureHandler::OnOOM(); if (alignment > 8) CHECK_EQ(reinterpret_cast(res) & (alignment - 1), 0); - // When serviced by the secondary, the chunk comes from a mmap allocation - // and will be zero'd out anyway. We only need to clear our the chunk if - // it was serviced by the primary, hence using the rounded up 'size'. - if (cleared && res && from_primary) - internal_bzero_aligned16(res, RoundUpTo(size, 16)); return res; } - bool MayReturnNull() const { - return atomic_load(&may_return_null_, memory_order_acquire); - } - - void *ReturnNullOrDieOnBadRequest() { - if (MayReturnNull()) - return nullptr; - ReportAllocatorCannotReturnNull(false); - } - - void *ReturnNullOrDieOnOOM() { - if (MayReturnNull()) - return nullptr; - ReportAllocatorCannotReturnNull(true); - } - - void SetMayReturnNull(bool may_return_null) { - secondary_.SetMayReturnNull(may_return_null); - atomic_store(&may_return_null_, may_return_null, memory_order_release); - } - s32 ReleaseToOSIntervalMs() const { return primary_.ReleaseToOSIntervalMs(); } @@ -219,6 +189,5 @@ class CombinedAllocator { PrimaryAllocator primary_; SecondaryAllocator secondary_; AllocatorGlobalStats stats_; - atomic_uint8_t may_return_null_; }; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_internal.h Mon Jun 26 20:33:22 2017 (r320378) @@ -47,7 +47,8 @@ typedef SizeClassAllocatorLocalCache > InternalAllocator; + LargeMmapAllocator + > InternalAllocator; void *InternalAlloc(uptr size, InternalAllocatorCache *cache = nullptr, uptr alignment = 0); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h Mon Jun 26 20:33:22 2017 (r320378) @@ -144,8 +144,10 @@ struct SizeClassAllocator32LocalCache { CHECK_NE(class_id, 0UL); CHECK_LT(class_id, kNumClasses); PerClass *c = &per_class_[class_id]; - if (UNLIKELY(c->count == 0)) - Refill(allocator, class_id); + if (UNLIKELY(c->count == 0)) { + if (UNLIKELY(!Refill(allocator, class_id))) + return nullptr; + } stats_.Add(AllocatorStatAllocated, c->class_size); void *res = c->batch[--c->count]; PREFETCH(c->batch[c->count - 1]); @@ -227,14 +229,17 @@ struct SizeClassAllocator32LocalCache { Deallocate(allocator, batch_class_id, b); } - NOINLINE void Refill(SizeClassAllocator *allocator, uptr class_id) { + NOINLINE bool Refill(SizeClassAllocator *allocator, uptr class_id) { InitCache(); PerClass *c = &per_class_[class_id]; TransferBatch *b = allocator->AllocateBatch(&stats_, this, class_id); + if (UNLIKELY(!b)) + return false; CHECK_GT(b->Count(), 0); b->CopyToArray(c->batch); c->count = b->Count(); DestroyBatch(class_id, allocator, b); + return true; } NOINLINE void Drain(SizeClassAllocator *allocator, uptr class_id) { @@ -244,6 +249,10 @@ struct SizeClassAllocator32LocalCache { uptr first_idx_to_drain = c->count - cnt; TransferBatch *b = CreateBatch( class_id, allocator, (TransferBatch *)c->batch[first_idx_to_drain]); + // Failure to allocate a batch while releasing memory is non recoverable. + // TODO(alekseys): Figure out how to do it without allocating a new batch. + if (UNLIKELY(!b)) + DieOnFailure::OnOOM(); b->SetFromArray(allocator->GetRegionBeginBySizeClass(class_id), &c->batch[first_idx_to_drain], cnt); c->count -= cnt; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon Jun 26 20:33:22 2017 (r320378) @@ -24,7 +24,8 @@ template struct SizeClassAll // be returned by MmapOrDie(). // // Region: -// a result of a single call to MmapAlignedOrDie(kRegionSize, kRegionSize). +// a result of a single call to MmapAlignedOrDieOnFatalError(kRegionSize, +// kRegionSize). // Since the regions are aligned by kRegionSize, there are exactly // kNumPossibleRegions possible regions in the address space and so we keep // a ByteMap possible_regions to store the size classes of each Region. @@ -149,8 +150,9 @@ class SizeClassAllocator32 { CHECK_LT(class_id, kNumClasses); SizeClassInfo *sci = GetSizeClassInfo(class_id); SpinMutexLock l(&sci->mutex); - if (sci->free_list.empty()) - PopulateFreeList(stat, c, sci, class_id); + if (sci->free_list.empty() && + UNLIKELY(!PopulateFreeList(stat, c, sci, class_id))) + return nullptr; CHECK(!sci->free_list.empty()); TransferBatch *b = sci->free_list.front(); sci->free_list.pop_front(); @@ -277,8 +279,10 @@ class SizeClassAllocator32 { uptr AllocateRegion(AllocatorStats *stat, uptr class_id) { CHECK_LT(class_id, kNumClasses); - uptr res = reinterpret_cast(MmapAlignedOrDie(kRegionSize, kRegionSize, - "SizeClassAllocator32")); + uptr res = reinterpret_cast(MmapAlignedOrDieOnFatalError( + kRegionSize, kRegionSize, "SizeClassAllocator32")); + if (UNLIKELY(!res)) + return 0; MapUnmapCallback().OnMap(res, kRegionSize); stat->Add(AllocatorStatMapped, kRegionSize); CHECK_EQ(0U, (res & (kRegionSize - 1))); @@ -291,16 +295,20 @@ class SizeClassAllocator32 { return &size_class_info_array[class_id]; } - void PopulateFreeList(AllocatorStats *stat, AllocatorCache *c, + bool PopulateFreeList(AllocatorStats *stat, AllocatorCache *c, SizeClassInfo *sci, uptr class_id) { uptr size = ClassIdToSize(class_id); uptr reg = AllocateRegion(stat, class_id); + if (UNLIKELY(!reg)) + return false; uptr n_chunks = kRegionSize / (size + kMetadataSize); uptr max_count = TransferBatch::MaxCached(class_id); TransferBatch *b = nullptr; for (uptr i = reg; i < reg + n_chunks * size; i += size) { if (!b) { b = c->CreateBatch(class_id, this, (TransferBatch*)i); + if (!b) + return false; b->Clear(); } b->Add((void*)i); @@ -314,6 +322,7 @@ class SizeClassAllocator32 { CHECK_GT(b->Count(), 0); sci->free_list.push_back(b); } + return true; } ByteMap possible_regions; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_secondary.h Mon Jun 26 20:33:22 2017 (r320378) @@ -17,17 +17,19 @@ // This class can (de)allocate only large chunks of memory using mmap/unmap. // The main purpose of this allocator is to cover large and rare allocation // sizes not covered by more efficient allocators (e.g. SizeClassAllocator64). -template +template class LargeMmapAllocator { public: - void InitLinkerInitialized(bool may_return_null) { + typedef FailureHandlerT FailureHandler; + + void InitLinkerInitialized() { page_size_ = GetPageSizeCached(); - atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); } - void Init(bool may_return_null) { + void Init() { internal_memset(this, 0, sizeof(*this)); - InitLinkerInitialized(may_return_null); + InitLinkerInitialized(); } void *Allocate(AllocatorStats *stat, uptr size, uptr alignment) { @@ -37,11 +39,11 @@ class LargeMmapAllocator { map_size += alignment; // Overflow. if (map_size < size) - return ReturnNullOrDieOnBadRequest(); + return FailureHandler::OnBadRequest(); uptr map_beg = reinterpret_cast( MmapOrDieOnFatalError(map_size, "LargeMmapAllocator")); if (!map_beg) - return ReturnNullOrDieOnOOM(); + return FailureHandler::OnOOM(); CHECK(IsAligned(map_beg, page_size_)); MapUnmapCallback().OnMap(map_beg, map_size); uptr map_end = map_beg + map_size; @@ -75,24 +77,6 @@ class LargeMmapAllocator { return reinterpret_cast(res); } - bool MayReturnNull() const { - return atomic_load(&may_return_null_, memory_order_acquire); - } - - void *ReturnNullOrDieOnBadRequest() { - if (MayReturnNull()) return nullptr; - ReportAllocatorCannotReturnNull(false); - } - - void *ReturnNullOrDieOnOOM() { - if (MayReturnNull()) return nullptr; - ReportAllocatorCannotReturnNull(true); - } - - void SetMayReturnNull(bool may_return_null) { - atomic_store(&may_return_null_, may_return_null, memory_order_release); - } - void Deallocate(AllocatorStats *stat, void *p) { Header *h = GetHeader(p); { @@ -278,7 +262,6 @@ class LargeMmapAllocator { struct Stats { uptr n_allocs, n_frees, currently_allocated, max_allocated, by_size_log[64]; } stats; - atomic_uint8_t may_return_null_; SpinMutex mutex_; }; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h Mon Jun 26 20:33:18 2017 (r320377) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h Mon Jun 26 20:33:22 2017 (r320378) @@ -71,16 +71,25 @@ INLINE typename T::Type atomic_exchange(volatile T *a, return v; } -template -INLINE bool atomic_compare_exchange_strong(volatile T *a, - typename T::Type *cmp, +template +INLINE bool atomic_compare_exchange_strong(volatile T *a, typename T::Type *cmp, typename T::Type xchg, memory_order mo) { typedef typename T::Type Type; Type cmpv = *cmp; - Type prev = __sync_val_compare_and_swap(&a->val_dont_use, cmpv, xchg); - if (prev == cmpv) - return true; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:30 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0923ED91415; Mon, 26 Jun 2017 20:33:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2BA664E9F; Mon, 26 Jun 2017 20:33:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXSmD098960; Mon, 26 Jun 2017 20:33:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXSjC098959; Mon, 26 Jun 2017 20:33:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXSjC098959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320379 - vendor/compiler-rt/compiler-rt-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:30 -0000 Author: dim Date: Mon Jun 26 20:33:28 2017 New Revision: 320379 URL: https://svnweb.freebsd.org/changeset/base/320379 Log: Tag compiler-rt trunk r306325. Added: vendor/compiler-rt/compiler-rt-trunk-r306325/ - copied from r320378, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:38 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98117D914A2; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 427EC64F5D; Mon, 26 Jun 2017 20:33:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXbAI099041; Mon, 26 Jun 2017 20:33:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXYkv099011; Mon, 26 Jun 2017 20:33:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXYkv099011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320380 - in vendor/libc++/dist: . include include/experimental src/experimental/filesystem test/std/algorithms/alg.nonmodifying/alg.foreach test/std/experimental/any/any.class/any.assi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:38 -0000 Author: dim Date: Mon Jun 26 20:33:34 2017 New Revision: 320380 URL: https://svnweb.freebsd.org/changeset/base/320380 Log: Vendor import of libc++ trunk r306325: https://llvm.org/svn/llvm-project/libcxx/trunk@306325 Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/include/__config vendor/libc++/dist/include/experimental/any vendor/libc++/dist/include/new vendor/libc++/dist/include/numeric vendor/libc++/dist/include/variant vendor/libc++/dist/src/experimental/filesystem/path.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp vendor/libc++/dist/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp vendor/libc++/dist/test/support/count_new.hpp vendor/libc++/dist/test/support/experimental_any_helpers.h vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/CMakeLists.txt Mon Jun 26 20:33:34 2017 (r320380) @@ -118,6 +118,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default") cxxabi.h PATHS ${LLVM_MAIN_SRC_DIR}/projects/libcxxabi/include ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include + ${LLVM_MAIN_SRC_DIR}/../libcxxabi/include NO_DEFAULT_PATH ) if (LIBCXX_TARGETING_MSVC) Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/__config Mon Jun 26 20:33:34 2017 (r320380) @@ -1154,6 +1154,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ __attribute__((availability(watchos,strict,introduced=3.0))) #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST __attribute__((unavailable)) #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ __attribute__((availability(macosx,strict,introduced=10.12))) \ __attribute__((availability(ios,strict,introduced=10.0))) \ @@ -1175,25 +1176,35 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION \ + __attribute__((availability(macosx,strict,introduced=10.13))) \ + __attribute__((availability(ios,strict,introduced=11.0))) \ + __attribute__((availability(tvos,strict,introduced=11.0))) \ + __attribute__((availability(watchos,strict,introduced=4.0))) #else #define _LIBCPP_AVAILABILITY_SHARED_MUTEX #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS #define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST #define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS #define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE #define _LIBCPP_AVAILABILITY_FUTURE_ERROR #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION #endif // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. #ifdef _LIBCPP_NO_EXCEPTIONS #define _LIBCPP_AVAILABILITY_DYNARRAY #define _LIBCPP_AVAILABILITY_FUTURE +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST #else #define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH #define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR +#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST \ + _LIBCPP_AVAILABILITY_BAD_ANY_CAST #endif // Availability of stream API in the dylib got dropped and re-added. The @@ -1202,9 +1213,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ // availability(ios,introduced=7.0) #if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ <= 1090) || \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) || \ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)) #define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE #endif Modified: vendor/libc++/dist/include/experimental/any ============================================================================== --- vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/experimental/any Mon Jun 26 20:33:34 2017 (r320380) @@ -89,7 +89,7 @@ inline namespace fundamentals_v1 { _LIBCPP_BEGIN_NAMESPACE_LFTS -class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_cast +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast { public: virtual const char* what() const _NOEXCEPT; @@ -98,6 +98,7 @@ class _LIBCPP_EXCEPTION_ABI bad_any_cast : public bad_ #if _LIBCPP_STD_VER > 11 // C++ > 11 _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST void __throw_bad_any_cast() { #ifndef _LIBCPP_NO_EXCEPTIONS @@ -506,7 +507,7 @@ void swap(any & __lhs, any & __rhs) _NOEXCEPT } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any const & __v) { static_assert( @@ -522,7 +523,7 @@ _ValueType any_cast(any const & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any & __v) { static_assert( @@ -537,7 +538,7 @@ _ValueType any_cast(any & __v) } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any && __v) { static_assert( Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/new Mon Jun 26 20:33:34 2017 (r320380) @@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE #endif #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif #endif Modified: vendor/libc++/dist/include/numeric ============================================================================== --- vendor/libc++/dist/include/numeric Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/numeric Mon Jun 26 20:33:34 2017 (r320380) @@ -81,6 +81,20 @@ template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, OutputIterator result); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op); // C++17 + +template + OutputIterator + inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, BinaryOperation binary_op, T init); // C++17 + template OutputIterator @@ -88,6 +102,21 @@ template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op); // C++17 + +template + OutputIterator + transform_inclusive_scan(InputIterator first, InputIterator last, + OutputIterator result, + BinaryOperation binary_op, UnaryOperation unary_op, + T init); // C++17 + template OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); @@ -295,6 +324,38 @@ exclusive_scan(_InputIterator __first, _InputIterator return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>()); } +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, *__first); + *__result = __init; + } + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = *__first; + *__result++ = __init; + if (++__first != __last) + return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); + } + + return __result; +} + +template +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) +{ + return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); +} + template inline _LIBCPP_INLINE_VISIBILITY @@ -314,6 +375,32 @@ transform_exclusive_scan(_InputIterator __first, _Inpu ++__result; } while (++__first != __last); } + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init) +{ + for (; __first != __last; ++__first, (void) ++__result) { + __init = __b(__init, __u(*__first)); + *__result = __init; + } + + return __result; +} + +template +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOp __b, _UnaryOp __u) +{ + if (__first != __last) { + typename std::iterator_traits<_InputIterator>::value_type __init = __u(*__first); + *__result++ = __init; + if (++__first != __last) + return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); + } + return __result; } #endif Modified: vendor/libc++/dist/include/variant ============================================================================== --- vendor/libc++/dist/include/variant Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/include/variant Mon Jun 26 20:33:34 2017 (r320380) @@ -1116,6 +1116,8 @@ class _LIBCPP_TEMPLATE_VIS variant (public) template < class _Arg, enable_if_t, variant>, int> = 0, + enable_if_t>::value, int> = 0, + enable_if_t>::value, int> = 0, class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>, size_t _Ip = __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value, Modified: vendor/libc++/dist/src/experimental/filesystem/path.cpp ============================================================================== --- vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/src/experimental/filesystem/path.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -261,7 +261,8 @@ struct PathParser { (private) string_view_pair separate_filename(string_view_t const & s) { if (s == "." || s == ".." || s.empty()) return string_view_pair{s, ""}; auto pos = s.find_last_of('.'); - if (pos == string_view_t::npos) return string_view_pair{s, string_view{}}; + if (pos == string_view_t::npos) + return string_view_pair{s, string_view_t{}}; return string_view_pair{s.substr(0, pos), s.substr(pos)}; } @@ -396,7 +397,7 @@ int path::__compare(string_view_t __s) const { size_t hash_value(const path& __p) noexcept { auto PP = PathParser::CreateBegin(__p.native()); size_t hash_value = 0; - std::hash hasher; + std::hash hasher; while (PP) { hash_value = __hash_combine(hash_value, hasher(*PP)); ++PP; Modified: vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -36,15 +36,15 @@ int main() auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 0, std::ref(f)); assert(it == Iter(ia)); - assert(f.count == 0); + assert(f.count == 0); } { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), s, std::ref(f)); - + assert(it == Iter(ia+s)); - assert(f.count == s); + assert(f.count == s); for (unsigned i = 0; i < s; ++i) assert(ia[i] == static_cast(i+1)); } @@ -52,9 +52,9 @@ int main() { auto f = for_each_test(0); Iter it = std::for_each_n(Iter(ia), 1, std::ref(f)); - + assert(it == Iter(ia+1)); - assert(f.count == 1); + assert(f.count == 1); for (unsigned i = 0; i < 1; ++i) assert(ia[i] == static_cast(i+2)); } Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -9,12 +9,7 @@ // UNSUPPORTED: c++98, c++03, c++11 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// XFAIL: availability=macosx // Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -35,7 +35,7 @@ test(It i, typename std::iterator_traits::differen #if TEST_STD_VER > 14 template -constexpr bool +constexpr bool constepxr_test(It i, typename std::iterator_traits::difference_type n, It x) { std::advance(i, n); Modified: vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -71,5 +71,5 @@ int main() static_assert( constexpr_test(s+1, s), "" ); } #endif - + } Added: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 +// REQUIRES: availability=macosx10.12 + +// test availability of new/delete operators introduced in c++17. + +#include + +int main () { + int *p0 = new ((std::align_val_t)16) int(1); + (void)p0; + int *p1 = new ((std::align_val_t)16) int[1]; + (void)p1; + // expected-error@-4 {{call to unavailable function 'operator new': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + + // expected-error@-9 {{call to unavailable function 'operator new[]': introduced in macOS 10.13}} + // expected-note@new:* {{candidate function has been explicitly made unavailable}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'const std::nothrow_t' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: no known conversion from 'std::align_val_t' to 'void *' for 2nd argument}} + // expected-note@new:* {{candidate function not viable: requires single argument '__sz', but 2 arguments were provided}} + // expected-note@new:* {{candidate function not viable: requires 3 arguments, but 2 were provided}} + return 0; +} Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init); -// +// #include #include @@ -26,7 +26,7 @@ void test(Iter1 first, Iter1 last, T init, Iter2 rFirst, Iter2 rLast) { std::vector::value_type> v; - + // Not in place std::exclusive_scan(first, last, std::back_inserter(v), init); assert(std::equal(v.begin(), v.end(), rFirst, rLast)); @@ -35,7 +35,7 @@ test(Iter1 first, Iter1 last, T init, Iter2 rFirst, It v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -13,7 +13,7 @@ // template // OutputIterator // exclusive_scan(InputIterator first, InputIterator last, -// OutputIterator result, +// OutputIterator result, // T init, BinaryOperation binary_op); // C++17 #include @@ -36,7 +36,7 @@ test(Iter1 first, Iter1 last, T init, Op op, Iter2 rFi v.clear(); v.assign(first, last); std::exclusive_scan(v.begin(), v.end(), v.begin(), init, op); - assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); } @@ -84,4 +84,3 @@ int main() } } } - \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,102 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, T init); +// + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v)); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) + test(Iter(ia), Iter(ia + i), pRes, pRes + i); +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res)); + assert(res.empty()); + } +} + +int main() +{ + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); +} Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,112 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op); // C++17 + +#include +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>()); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>()); + assert(res.empty()); + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories +// test >(); +// test >(); +// test >(); +// test >(); +// test(); +// test< int*>(); + +} + \ No newline at end of file Added: vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,128 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator +// inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, T init); // C++17 + +#include +#include +#include + +#include "test_iterators.h" + +template +void +test(Iter1 first, Iter1 last, Op op, T init, Iter2 rFirst, Iter2 rLast) +{ + std::vector::value_type> v; + +// Not in place + std::inclusive_scan(first, last, std::back_inserter(v), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); + +// In place + v.clear(); + v.assign(first, last); + std::inclusive_scan(v.begin(), v.end(), v.begin(), op, init); + assert(std::equal(v.begin(), v.end(), rFirst, rLast)); +} + + +template +void +test() +{ + int ia[] = {1, 3, 5, 7, 9}; + const int pRes[] = {1, 4, 9, 16, 25}; + const int mRes[] = {1, 3, 15, 105, 945}; + const unsigned sa = sizeof(ia) / sizeof(ia[0]); + static_assert(sa == sizeof(pRes) / sizeof(pRes[0])); // just to be sure + static_assert(sa == sizeof(mRes) / sizeof(mRes[0])); // just to be sure + + for (unsigned int i = 0; i < sa; ++i ) { + test(Iter(ia), Iter(ia + i), std::plus<>(), 0, pRes, pRes + i); + test(Iter(ia), Iter(ia + i), std::multiplies<>(), 1, mRes, mRes + i); + } +} + +int triangle(int n) { return n*(n+1)/2; } + +// Basic sanity +void basic_tests() +{ + { + std::vector v(10); + std::fill(v.begin(), v.end(), 3); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 50); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 50 + (int)(i+1) * 3); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 0); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 40); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 40 + triangle(i)); + } + + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), 30); + for (size_t i = 0; i < v.size(); ++i) + assert(v[i] == 30 + triangle(i + 1)); + } + + { + std::vector v, res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::plus<>(), 40); + assert(res.empty()); + } + +// Make sure that the calculations are done using the init typedef + { + std::vector v(10); + std::iota(v.begin(), v.end(), 1); + std::vector res; + std::inclusive_scan(v.begin(), v.end(), std::back_inserter(res), std::multiplies<>(), 1); + + assert(res.size() == 10); + int j = 1; + assert(res[0] == 1); + for (size_t i = 1; i < v.size(); ++i) + { + j *= i + 1; + assert(res[i] == j); + } + } +} + + +int main() +{ + + basic_tests(); + +// All the iterator categories + test >(); + test >(); + test >(); + test >(); + test(); + test< int*>(); + +} + \ No newline at end of file Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -12,7 +12,7 @@ // template // T reduce(InputIterator first, InputIterator last, T init, BinaryOperation op); - + #include #include Modified: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:28 2017 (r320379) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -10,7 +10,7 @@ // // UNSUPPORTED: c++98, c++03, c++11, c++14 -// template // OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init, @@ -64,11 +64,11 @@ test() { int ia[] = { 1, 3, 5, 7, 9}; const int pResI0[] = { 0, 1, 4, 9, 16}; // with identity - const int mResI0[] = { 0, 0, 0, 0, 0}; + const int mResI0[] = { 0, 0, 0, 0, 0}; const int pResN0[] = { 0, -1, -4, -9, -16}; // with negate const int mResN0[] = { 0, 0, 0, 0, 0}; const int pResI2[] = { 2, 3, 6, 11, 18}; // with identity - const int mResI2[] = { 2, 2, 6, 30, 210}; + const int mResI2[] = { 2, 2, 6, 30, 210}; const int pResN2[] = { 2, 1, -2, -7, -14}; // with negate const int mResN2[] = { 2, -2, 6, -30, 210}; const unsigned sa = sizeof(ia) / sizeof(ia[0]); @@ -149,7 +149,7 @@ void basic_tests() int main() { basic_tests(); - + // All the iterator categories test >(); test >(); Added: vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp Mon Jun 26 20:33:34 2017 (r320380) @@ -0,0 +1,133 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, +// OutputIterator result, +// BinaryOperation binary_op, +// UnaryOperation unary_op); + + +#include +#include +#include +#include + +#include "test_iterators.h" + +template *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:42 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD2D4D914B9; Mon, 26 Jun 2017 20:33:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55AC664FBD; Mon, 26 Jun 2017 20:33:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXfCN099090; Mon, 26 Jun 2017 20:33:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXfNO099089; Mon, 26 Jun 2017 20:33:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXfNO099089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320381 - vendor/libc++/libc++-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:42 -0000 Author: dim Date: Mon Jun 26 20:33:41 2017 New Revision: 320381 URL: https://svnweb.freebsd.org/changeset/base/320381 Log: Tag libc++ trunk r306325. Added: vendor/libc++/libc++-trunk-r306325/ - copied from r320380, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:48 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 589FFD914F1; Mon, 26 Jun 2017 20:33:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D830365032; Mon, 26 Jun 2017 20:33:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXlO2099152; Mon, 26 Jun 2017 20:33:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXj8a099136; Mon, 26 Jun 2017 20:33:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXj8a099136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320382 - in vendor/lld/dist: . COFF ELF ELF/Arch docs lib/Driver lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript test/ELF/lto test... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:48 -0000 Author: dim Date: Mon Jun 26 20:33:45 2017 New Revision: 320382 URL: https://svnweb.freebsd.org/changeset/base/320382 Log: Vendor import of lld trunk r306325: https://llvm.org/svn/llvm-project/lld/trunk@306325 Added: vendor/lld/dist/ELF/Arch/MipsArchTree.cpp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/associative-comdat-2.s (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb_comdat_bar.yaml vendor/lld/dist/test/COFF/Inputs/pdb_comdat_main.yaml vendor/lld/dist/test/COFF/Inputs/pdb_lines_1.yaml vendor/lld/dist/test/COFF/Inputs/pdb_lines_2.yaml vendor/lld/dist/test/COFF/associative-comdat.s (contents, props changed) vendor/lld/dist/test/COFF/guardcf.test vendor/lld/dist/test/COFF/pdb-comdat.test vendor/lld/dist/test/COFF/pdb-safeseh.yaml vendor/lld/dist/test/COFF/pdb-secrel-absolute.yaml vendor/lld/dist/test/COFF/pdb-source-lines.test vendor/lld/dist/test/COFF/pdb-symbol-types.yaml vendor/lld/dist/test/COFF/safeseh-diag-feat.test vendor/lld/dist/test/COFF/safeseh.s (contents, props changed) vendor/lld/dist/test/COFF/secidx-absolute.s (contents, props changed) vendor/lld/dist/test/COFF/secrel-absolute.s (contents, props changed) vendor/lld/dist/test/COFF/secrel-common.s (contents, props changed) vendor/lld/dist/test/ELF/Inputs/exclude-libs.s (contents, props changed) vendor/lld/dist/test/ELF/exclude-libs.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-aarch64.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-arm.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-i386.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position-mips.s (contents, props changed) vendor/lld/dist/test/ELF/global-offset-table-position.s (contents, props changed) vendor/lld/dist/test/ELF/invalid-z.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/discard-section-err.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/segment-none.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/ttext-script.s (contents, props changed) Deleted: vendor/lld/dist/ELF/Mips.cpp vendor/lld/dist/test/COFF/safeseh.test Modified: vendor/lld/dist/COFF/Chunks.cpp vendor/lld/dist/COFF/Chunks.h vendor/lld/dist/COFF/Config.h vendor/lld/dist/COFF/Driver.cpp vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/DriverUtils.cpp vendor/lld/dist/COFF/InputFiles.cpp vendor/lld/dist/COFF/Options.td vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/COFF/Strings.cpp vendor/lld/dist/COFF/SymbolTable.cpp vendor/lld/dist/COFF/SymbolTable.h vendor/lld/dist/COFF/Symbols.cpp vendor/lld/dist/COFF/Symbols.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/Arch/AArch64.cpp vendor/lld/dist/ELF/Arch/AMDGPU.cpp vendor/lld/dist/ELF/Arch/ARM.cpp vendor/lld/dist/ELF/Arch/AVR.cpp vendor/lld/dist/ELF/Arch/Mips.cpp vendor/lld/dist/ELF/Arch/PPC.cpp vendor/lld/dist/ELF/Arch/PPC64.cpp vendor/lld/dist/ELF/Arch/X86.cpp vendor/lld/dist/ELF/Arch/X86_64.cpp vendor/lld/dist/ELF/CMakeLists.txt vendor/lld/dist/ELF/Config.h vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/Driver.h vendor/lld/dist/ELF/DriverUtils.cpp vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/InputFiles.h vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/MarkLive.cpp vendor/lld/dist/ELF/Options.td vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/SymbolTable.cpp vendor/lld/dist/ELF/SymbolTable.h vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/Symbols.h vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Target.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/README.md vendor/lld/dist/docs/windows_support.rst vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp vendor/lld/dist/test/COFF/Inputs/pdb1.yaml vendor/lld/dist/test/COFF/def-name.test vendor/lld/dist/test/COFF/dll.test vendor/lld/dist/test/COFF/dllimport-gc.test vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/icf-associative.test vendor/lld/dist/test/COFF/manifestinput.test vendor/lld/dist/test/COFF/noentry.test vendor/lld/dist/test/COFF/out.test vendor/lld/dist/test/COFF/pdb-lib.s vendor/lld/dist/test/COFF/pdb.test vendor/lld/dist/test/COFF/resource.test vendor/lld/dist/test/ELF/arm-gnu-ifunc-plt.s vendor/lld/dist/test/ELF/arm-got-relative.s vendor/lld/dist/test/ELF/arm-thumb-branch.s vendor/lld/dist/test/ELF/arm-thumb-plt-reloc.s vendor/lld/dist/test/ELF/defsym.s vendor/lld/dist/test/ELF/global_offset_table_shared.s vendor/lld/dist/test/ELF/linkerscript/sections.s vendor/lld/dist/test/ELF/lto/cache.ll vendor/lld/dist/test/ELF/lto/wrap-2.ll vendor/lld/dist/test/ELF/mips-got16-relocatable.s vendor/lld/dist/test/ELF/mips-npic-call-pic-os.s vendor/lld/dist/test/ELF/mips-npic-call-pic-script.s vendor/lld/dist/test/ELF/mips-npic-call-pic.s vendor/lld/dist/test/ELF/mips-plt-r6.s vendor/lld/dist/test/ELF/wrap.s vendor/lld/dist/test/lit.cfg vendor/lld/dist/test/mach-o/executable-exports.yaml Modified: vendor/lld/dist/COFF/Chunks.cpp ============================================================================== --- vendor/lld/dist/COFF/Chunks.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Chunks.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -37,8 +37,14 @@ SectionChunk::SectionChunk(ObjectFile *F, const coff_s Align = Header->getAlignment(); - // Only COMDAT sections are subject of dead-stripping. - Live = !isCOMDAT(); + // Chunks may be discarded during comdat merging. + Discarded = false; + + // If linker GC is disabled, every chunk starts out alive. If linker GC is + // enabled, treat non-comdat sections as roots. Generally optimized object + // files will be built with -ffunction-sections or /Gy, so most things worth + // stripping will be in a comdat. + Live = !Config->DoGC || !isCOMDAT(); } static void add16(uint8_t *P, int16_t V) { write16le(P, read16le(P) + V); } @@ -46,6 +52,15 @@ static void add32(uint8_t *P, int32_t V) { write32le(P static void add64(uint8_t *P, int64_t V) { write64le(P, read64le(P) + V); } static void or16(uint8_t *P, uint16_t V) { write16le(P, read16le(P) | V); } +static void applySecRel(const SectionChunk *Sec, uint8_t *Off, Defined *Sym) { + // Don't apply section relative relocations to absolute symbols in codeview + // debug info sections. MSVC does not treat such relocations as fatal errors, + // and they can be found in the standard library for linker-provided symbols + // like __guard_fids_table and __safe_se_handler_table. + if (!(isa(Sym) && Sec->isCodeView())) + add32(Off, Sym->getSecrel()); +} + void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const { uint64_t S = Sym->getRVA(); @@ -60,7 +75,7 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t case IMAGE_REL_AMD64_REL32_4: add32(Off, S - P - 8); break; case IMAGE_REL_AMD64_REL32_5: add32(Off, S - P - 9); break; case IMAGE_REL_AMD64_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_AMD64_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -75,7 +90,7 @@ void SectionChunk::applyRelX86(uint8_t *Off, uint16_t case IMAGE_REL_I386_DIR32NB: add32(Off, S); break; case IMAGE_REL_I386_REL32: add32(Off, S - P - 4); break; case IMAGE_REL_I386_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_I386_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_I386_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -135,7 +150,7 @@ void SectionChunk::applyRelARM(uint8_t *Off, uint16_t case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break; case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break; case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_SECREL: add32(Off, Sym->getSecrel()); break; + case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, Sym); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -226,8 +241,12 @@ bool SectionChunk::isCOMDAT() const { void SectionChunk::printDiscardedMessage() const { // Removed by dead-stripping. If it's removed by ICF, ICF already // printed out the name, so don't repeat that here. - if (Sym && this == Repl) - message("Discarded " + Sym->getName()); + if (Sym && this == Repl) { + if (Discarded) + message("Discarded comdat symbol " + Sym->getName()); + else if (!Live) + message("Discarded " + Sym->getName()); + } } StringRef SectionChunk::getDebugName() { Modified: vendor/lld/dist/COFF/Chunks.h ============================================================================== --- vendor/lld/dist/COFF/Chunks.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Chunks.h Mon Jun 26 20:33:45 2017 (r320382) @@ -64,7 +64,6 @@ class Chunk { (public) uint64_t getRVA() const { return RVA; } uint32_t getAlign() const { return Align; } void setRVA(uint64_t V) { RVA = V; } - void setOutputSectionOff(uint64_t V) { OutputSectionOff = V; } // Returns true if this has non-zero data. BSS chunks return // false. If false is returned, the space occupied by this chunk @@ -97,17 +96,19 @@ class Chunk { (public) Chunk(Kind K = OtherKind) : ChunkKind(K) {} const Kind ChunkKind; + // The alignment of this chunk. The writer uses the value. + uint32_t Align = 1; + // The RVA of this chunk in the output. The writer sets a value. uint64_t RVA = 0; +public: // The offset from beginning of the output section. The writer sets a value. uint64_t OutputSectionOff = 0; +protected: // The output section for this chunk. OutputSection *Out = nullptr; - - // The alignment of this chunk. The writer uses the value. - uint32_t Align = 1; }; // A chunk corresponding a section of an input file. @@ -159,13 +160,29 @@ class SectionChunk : public Chunk { (public) StringRef getDebugName() override; void setSymbol(DefinedRegular *S) { if (!Sym) Sym = S; } + // Returns true if the chunk was not dropped by GC or COMDAT deduplication. + bool isLive() { return Live && !Discarded; } + // Used by the garbage collector. - bool isLive() { return !Config->DoGC || Live; } void markLive() { + assert(Config->DoGC && "should only mark things live from GC"); assert(!isLive() && "Cannot mark an already live section!"); Live = true; } + // Returns true if this chunk was dropped by COMDAT deduplication. + bool isDiscarded() const { return Discarded; } + + // Used by the SymbolTable when discarding unused comdat sections. This is + // redundant when GC is enabled, as all comdat sections will start out dead. + void markDiscarded() { Discarded = true; } + + // True if this is a codeview debug info chunk. These will not be laid out in + // the image. Instead they will end up in the PDB, if one is requested. + bool isCodeView() const { + return SectionName == ".debug" || SectionName.startswith(".debug$"); + } + // Allow iteration over the bodies of this chunk's relocated symbols. llvm::iterator_range symbols() const { return llvm::make_range(symbol_iterator(File, Relocs.begin()), @@ -195,6 +212,9 @@ class SectionChunk : public Chunk { (public) std::vector AssocChildren; llvm::iterator_range Relocs; size_t NumRelocs; + + // True if this chunk was discarded because it was a duplicate comdat section. + bool Discarded; // Used by the garbage collector. bool Live; Modified: vendor/lld/dist/COFF/Config.h ============================================================================== --- vendor/lld/dist/COFF/Config.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Config.h Mon Jun 26 20:33:45 2017 (r320382) @@ -161,9 +161,6 @@ struct Configuration { bool LargeAddressAware = false; bool HighEntropyVA = false; bool AppContainer = false; - - // This is for debugging. - bool DumpPdb = false; }; extern Configuration *Config; Modified: vendor/lld/dist/COFF/Driver.cpp ============================================================================== --- vendor/lld/dist/COFF/Driver.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Driver.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -905,7 +905,6 @@ void LinkerDriver::link(ArrayRef ArgsArr Config->TerminalServerAware = false; if (Args.hasArg(OPT_nosymtab)) Config->WriteSymtab = false; - Config->DumpPdb = Args.hasArg(OPT_dumppdb); Config->MapFile = getMapFile(Args); @@ -936,9 +935,9 @@ void LinkerDriver::link(ArrayRef ArgsArr Config->Machine = AMD64; } - // Windows specific -- Input files can be Windows resource files (.res files). - // We invoke cvtres.exe to convert resource files to a regular COFF file - // then link the result file normally. + // Input files can be Windows resource files (.res files). We use + // WindowsResource to convert resource files to a regular COFF file, + // then link the resulting file normally. if (!Resources.empty()) addBuffer(convertResToCOFF(Resources)); @@ -1027,17 +1026,21 @@ void LinkerDriver::link(ArrayRef ArgsArr if (Config->ImageBase == uint64_t(-1)) Config->ImageBase = getDefaultImageBase(); - Symtab.addRelative(mangle("__ImageBase"), 0); + Symtab.addSynthetic(mangle("__ImageBase"), nullptr); if (Config->Machine == I386) { - Config->SEHTable = Symtab.addRelative("___safe_se_handler_table", 0); - Config->SEHCount = Symtab.addAbsolute("___safe_se_handler_count", 0); + Symtab.addAbsolute("___safe_se_handler_table", 0); + Symtab.addAbsolute("___safe_se_handler_count", 0); } // We do not support /guard:cf (control flow protection) yet. // Define CFG symbols anyway so that we can link MSVC 2015 CRT. - Symtab.addAbsolute(mangle("__guard_fids_table"), 0); Symtab.addAbsolute(mangle("__guard_fids_count"), 0); + Symtab.addAbsolute(mangle("__guard_fids_table"), 0); Symtab.addAbsolute(mangle("__guard_flags"), 0x100); + Symtab.addAbsolute(mangle("__guard_iat_count"), 0); + Symtab.addAbsolute(mangle("__guard_iat_table"), 0); + Symtab.addAbsolute(mangle("__guard_longjmp_count"), 0); + Symtab.addAbsolute(mangle("__guard_longjmp_table"), 0); // This code may add new undefined symbols to the link, which may enqueue more // symbol resolution tasks, so we need to continue executing tasks until we Modified: vendor/lld/dist/COFF/Driver.h ============================================================================== --- vendor/lld/dist/COFF/Driver.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Driver.h Mon Jun 26 20:33:45 2017 (r320382) @@ -178,7 +178,7 @@ void runMSVCLinker(std::string Rsp, ArrayRef +createMemoryBufferForManifestRes(size_t ManifestSize) { + size_t ResSize = alignTo(object::WIN_RES_MAGIC_SIZE + + object::WIN_RES_NULL_ENTRY_SIZE + + sizeof(object::WinResHeaderPrefix) + + sizeof(object::WinResIDs) + + sizeof(object::WinResHeaderSuffix) + + ManifestSize, + object::WIN_RES_DATA_ALIGNMENT); + return MemoryBuffer::getNewMemBuffer(ResSize); +} + +static void writeResFileHeader(char *&Buf) { + memcpy(Buf, COFF::WinResMagic, sizeof(COFF::WinResMagic)); + Buf += sizeof(COFF::WinResMagic); + memset(Buf, 0, object::WIN_RES_NULL_ENTRY_SIZE); + Buf += object::WIN_RES_NULL_ENTRY_SIZE; +} + +static void writeResEntryHeader(char *&Buf, size_t ManifestSize) { + // Write the prefix. + auto *Prefix = reinterpret_cast(Buf); + Prefix->DataSize = ManifestSize; + Prefix->HeaderSize = sizeof(object::WinResHeaderPrefix) + + sizeof(object::WinResIDs) + + sizeof(object::WinResHeaderSuffix); + Buf += sizeof(object::WinResHeaderPrefix); + + // Write the Type/Name IDs. + auto *IDs = reinterpret_cast(Buf); + IDs->setType(RT_MANIFEST); + IDs->setName(Config->ManifestID); + Buf += sizeof(object::WinResIDs); + + // Write the suffix. + auto *Suffix = reinterpret_cast(Buf); + Suffix->DataVersion = 0; + Suffix->MemoryFlags = object::WIN_RES_PURE_MOVEABLE; + Suffix->Language = SUBLANG_ENGLISH_US; + Suffix->Version = 0; + Suffix->Characteristics = 0; + Buf += sizeof(object::WinResHeaderSuffix); +} + // Create a resource file containing a manifest XML. std::unique_ptr createManifestRes() { - // Create a temporary file for the resource script file. - TemporaryFile RCFile("manifest", "rc"); + std::string Manifest = createManifestXml(); - // Open the temporary file for writing. - std::error_code EC; - raw_fd_ostream Out(RCFile.Path, EC, sys::fs::F_Text); - if (EC) - fatal(EC, "failed to open " + RCFile.Path); + std::unique_ptr Res = + createMemoryBufferForManifestRes(Manifest.size()); - // Write resource script to the RC file. - Out << "#define LANG_ENGLISH 9\n" - << "#define SUBLANG_DEFAULT 1\n" - << "#define APP_MANIFEST " << Config->ManifestID << "\n" - << "#define RT_MANIFEST 24\n" - << "LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT\n" - << "APP_MANIFEST RT_MANIFEST {\n"; - quoteAndPrint(Out, createManifestXml()); - Out << "}\n"; - Out.close(); + char *Buf = const_cast(Res->getBufferStart()); + writeResFileHeader(Buf); + writeResEntryHeader(Buf, Manifest.size()); - // Create output resource file. - TemporaryFile ResFile("output-resource", "res"); - - Executor E("rc.exe"); - E.add("/fo"); - E.add(ResFile.Path); - E.add("/nologo"); - E.add(RCFile.Path); - E.run(); - return ResFile.getMemoryBuffer(); + // Copy the manifest data into the .res file. + std::copy(Manifest.begin(), Manifest.end(), Buf); + return Res; } void createSideBySideManifest() { @@ -592,40 +604,22 @@ void checkFailIfMismatch(StringRef Arg) { // using cvtres.exe. std::unique_ptr convertResToCOFF(const std::vector &MBs) { - // Create an output file path. - TemporaryFile File("resource-file", "obj"); + object::WindowsResourceParser Parser; - // Execute cvtres.exe. - Executor E("cvtres.exe"); - E.add("/machine:" + machineToStr(Config->Machine)); - E.add("/readonly"); - E.add("/nologo"); - E.add("/out:" + Twine(File.Path)); - - // We must create new files because the memory buffers we have may have no - // underlying file still existing on the disk. - // It happens if it was created from a TemporaryFile, which usually delete - // the file just after creating the MemoryBuffer. - std::vector ResFiles; - ResFiles.reserve(MBs.size()); for (MemoryBufferRef MB : MBs) { - // We store the temporary file in a vector to avoid deletion - // before running cvtres - ResFiles.emplace_back("resource-file", "res"); - TemporaryFile& ResFile = ResFiles.back(); - // Write the content of the resource in a temporary file - std::error_code EC; - raw_fd_ostream OS(ResFile.Path, EC, sys::fs::F_None); - if (EC) - fatal(EC, "failed to open " + ResFile.Path); - OS << MB.getBuffer(); - OS.close(); - - E.add(ResFile.Path); + std::unique_ptr Bin = check(object::createBinary(MB)); + object::WindowsResource *RF = dyn_cast(Bin.get()); + if (!RF) + fatal("cannot compile non-resource file as resource"); + if (auto EC = Parser.parse(RF)) + fatal(EC, "failed to parse .res file"); } - E.run(); - return File.getMemoryBuffer(); + Expected> E = + llvm::object::writeWindowsResourceCOFF(Config->Machine, Parser); + if (!E) + fatal(errorToErrorCode(E.takeError()), "failed to write .res to COFF"); + return std::move(E.get()); } // Run MSVC link.exe for given in-memory object files. @@ -657,11 +651,9 @@ void runMSVCLinker(std::string Rsp, ArrayRefDebug && Name.startswith(".debug")) continue; - // CodeView sections are stored to a different vector because they are - // not linked in the regular manner. - if (Name == ".debug" || Name.startswith(".debug$")) { - DebugChunks.push_back(make(this, Sec)); - continue; - } - if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE) continue; auto *C = make(this, Sec); - Chunks.push_back(C); + + // CodeView sections are stored to a different vector because they are not + // linked in the regular manner. + if (C->isCodeView()) + DebugChunks.push_back(C); + else + Chunks.push_back(C); + SparseChunks[I] = C; } } @@ -249,8 +249,12 @@ SymbolBody *ObjectFile::createDefined(COFFSymbolRef Sy auto *Aux = reinterpret_cast(AuxP); if (Aux->Selection == IMAGE_COMDAT_SELECT_ASSOCIATIVE) if (auto *ParentSC = cast_or_null( - SparseChunks[Aux->getNumber(Sym.isBigObj())])) + SparseChunks[Aux->getNumber(Sym.isBigObj())])) { ParentSC->addAssociative(SC); + // If we already discarded the parent, discard the child. + if (ParentSC->isDiscarded()) + SC->markDiscarded(); + } SC->Checksum = Aux->CheckSum; } Modified: vendor/lld/dist/COFF/Options.td ============================================================================== --- vendor/lld/dist/COFF/Options.td Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Options.td Mon Jun 26 20:33:45 2017 (r320382) @@ -102,7 +102,6 @@ def nosymtab : F<"nosymtab">; def msvclto : F<"msvclto">; // Flags for debugging -def dumppdb : Joined<["/", "-"], "dumppdb">; def lldmap : F<"lldmap">; def lldmap_file : Joined<["/", "-"], "lldmap:">; Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/PDB.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -15,10 +15,11 @@ #include "Symbols.h" #include "llvm/DebugInfo/CodeView/CVDebugRecord.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionRecord.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" -#include "llvm/DebugInfo/CodeView/SymbolDumper.h" -#include "llvm/DebugInfo/CodeView/TypeDatabase.h" #include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h" +#include "llvm/DebugInfo/CodeView/TypeIndexDiscovery.h" #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" #include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" @@ -46,8 +47,6 @@ using namespace lld; using namespace lld::coff; using namespace llvm; using namespace llvm::codeview; -using namespace llvm::support; -using namespace llvm::support::endian; using llvm::object::coff_section; @@ -68,22 +67,24 @@ static SectionChunk *findByName(std::vector getDebugSection(ObjectFile *File, StringRef SecName) { - SectionChunk *Sec = findByName(File->getDebugChunks(), SecName); - if (!Sec) - return {}; - +static ArrayRef consumeDebugMagic(ArrayRef Data, + StringRef SecName) { // First 4 bytes are section magic. - ArrayRef Data = Sec->getContents(); if (Data.size() < 4) fatal(SecName + " too short"); - if (read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) + if (support::endian::read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) fatal(SecName + " has an invalid magic"); return Data.slice(4); } +static ArrayRef getDebugSection(ObjectFile *File, StringRef SecName) { + if (SectionChunk *Sec = findByName(File->getDebugChunks(), SecName)) + return consumeDebugMagic(Sec->getContents(), SecName); + return {}; +} + static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuilder, - codeview::TypeTableBuilder &TypeTable) { + TypeTableBuilder &TypeTable) { // Start the TPI or IPI stream header. TpiBuilder.setVersionHeader(pdb::PdbTpiV80); @@ -94,17 +95,148 @@ static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuil }); } +static void mergeDebugT(ObjectFile *File, + TypeTableBuilder &IDTable, + TypeTableBuilder &TypeTable, + SmallVectorImpl &TypeIndexMap, + pdb::PDBTypeServerHandler &Handler) { + ArrayRef Data = getDebugSection(File, ".debug$T"); + if (Data.empty()) + return; + + BinaryByteStream Stream(Data, support::little); + CVTypeArray Types; + BinaryStreamReader Reader(Stream); + Handler.addSearchPath(sys::path::parent_path(File->getName())); + if (auto EC = Reader.readArray(Types, Reader.getLength())) + fatal(EC, "Reader::readArray failed"); + if (auto Err = mergeTypeAndIdRecords(IDTable, TypeTable, + TypeIndexMap, &Handler, Types)) + fatal(Err, "codeview::mergeTypeStreams failed"); +} + +static bool remapTypeIndex(TypeIndex &TI, ArrayRef TypeIndexMap) { + if (TI.isSimple()) + return true; + if (TI.toArrayIndex() >= TypeIndexMap.size()) + return false; + TI = TypeIndexMap[TI.toArrayIndex()]; + return true; +} + +static bool remapTypesInSymbolRecord(ObjectFile *File, + MutableArrayRef Contents, + ArrayRef TypeIndexMap, + ArrayRef TypeRefs) { + for (const TiReference &Ref : TypeRefs) { + unsigned ByteSize = Ref.Count * sizeof(TypeIndex); + if (Contents.size() < Ref.Offset + ByteSize) { + log("ignoring short symbol record"); + return false; + } + MutableArrayRef TIs( + reinterpret_cast(Contents.data() + Ref.Offset), Ref.Count); + for (TypeIndex &TI : TIs) + if (!remapTypeIndex(TI, TypeIndexMap)) { + log("ignoring symbol record in " + File->getName() + + " with bad type index 0x" + utohexstr(TI.getIndex())); + return false; + } + } + return true; +} + +/// MSVC translates S_PROC_ID_END to S_END. +uint16_t canonicalizeSymbolKind(SymbolKind Kind) { + if (Kind == SymbolKind::S_PROC_ID_END) + return SymbolKind::S_END; + return Kind; +} + +/// Copy the symbol record. In a PDB, symbol records must be 4 byte aligned. +/// The object file may not be aligned. +static MutableArrayRef copySymbolForPdb(const CVSymbol &Sym, + BumpPtrAllocator &Alloc) { + size_t Size = alignTo(Sym.length(), alignOf(CodeViewContainer::Pdb)); + assert(Size >= 4 && "record too short"); + assert(Size <= MaxRecordLength && "record too long"); + void *Mem = Alloc.Allocate(Size, 4); + + // Copy the symbol record and zero out any padding bytes. + MutableArrayRef NewData(reinterpret_cast(Mem), Size); + memcpy(NewData.data(), Sym.data().data(), Sym.length()); + memset(NewData.data() + Sym.length(), 0, Size - Sym.length()); + + // Update the record prefix length. It should point to the beginning of the + // next record. MSVC does some canonicalization of the record kind, so we do + // that as well. + auto *Prefix = reinterpret_cast(Mem); + Prefix->RecordKind = canonicalizeSymbolKind(Sym.kind()); + Prefix->RecordLen = Size - 2; + return NewData; +} + +static void mergeSymbolRecords(BumpPtrAllocator &Alloc, ObjectFile *File, + ArrayRef TypeIndexMap, + BinaryStreamRef SymData) { + // FIXME: Improve error recovery by warning and skipping records when + // possible. + CVSymbolArray Syms; + BinaryStreamReader Reader(SymData); + ExitOnErr(Reader.readArray(Syms, Reader.getLength())); + for (const CVSymbol &Sym : Syms) { + // Discover type index references in the record. Skip it if we don't know + // where they are. + SmallVector TypeRefs; + if (!discoverTypeIndices(Sym, TypeRefs)) { + log("ignoring unknown symbol record with kind 0x" + utohexstr(Sym.kind())); + continue; + } + + // Copy the symbol record so we can mutate it. + MutableArrayRef NewData = copySymbolForPdb(Sym, Alloc); + + // Re-map all the type index references. + MutableArrayRef Contents = + NewData.drop_front(sizeof(RecordPrefix)); + if (!remapTypesInSymbolRecord(File, Contents, TypeIndexMap, TypeRefs)) + continue; + + // FIXME: Fill in "Parent" and "End" fields by maintaining a stack of + // scopes. + + // Add the symbol to the module. + File->ModuleDBI->addSymbol(CVSymbol(Sym.kind(), NewData)); + } +} + +// Allocate memory for a .debug$S section and relocate it. +static ArrayRef relocateDebugChunk(BumpPtrAllocator &Alloc, + SectionChunk *DebugChunk) { + uint8_t *Buffer = Alloc.Allocate(DebugChunk->getSize()); + assert(DebugChunk->OutputSectionOff == 0 && + "debug sections should not be in output sections"); + DebugChunk->writeTo(Buffer); + return consumeDebugMagic(makeArrayRef(Buffer, DebugChunk->getSize()), + ".debug$S"); +} + // Add all object files to the PDB. Merge .debug$T sections into IpiData and // TpiData. -static void addObjectsToPDB(SymbolTable *Symtab, pdb::PDBFileBuilder &Builder, - codeview::TypeTableBuilder &TypeTable, - codeview::TypeTableBuilder &IDTable) { +static void addObjectsToPDB(BumpPtrAllocator &Alloc, SymbolTable *Symtab, + pdb::PDBFileBuilder &Builder, + TypeTableBuilder &TypeTable, + TypeTableBuilder &IDTable) { // Follow type servers. If the same type server is encountered more than // once for this instance of `PDBTypeServerHandler` (for example if many // object files reference the same TypeServer), the types from the // TypeServer will only be visited once. pdb::PDBTypeServerHandler Handler; + // PDBs use a single global string table for filenames in the file checksum + // table. + auto PDBStrTab = std::make_shared(); + // Visit all .debug$T sections to add them to Builder. for (ObjectFile *File : Symtab->ObjectFiles) { // Add a module descriptor for every object file. We need to put an absolute @@ -118,25 +250,74 @@ static void addObjectsToPDB(SymbolTable *Symtab, pdb:: File->ModuleDBI = &ExitOnErr(Builder.getDbiBuilder().addModuleInfo(Name)); File->ModuleDBI->setObjFileName(Path); - // FIXME: Walk the .debug$S sections and add them. Do things like recording - // source files. + // Before we can process symbol substreams from .debug$S, we need to process + // type information, file checksums, and the string table. Add type info to + // the PDB first, so that we can get the map from object file type and item + // indices to PDB type and item indices. + SmallVector TypeIndexMap; + mergeDebugT(File, IDTable, TypeTable, TypeIndexMap, Handler); - ArrayRef Data = getDebugSection(File, ".debug$T"); - if (Data.empty()) - continue; + // Now do all line info. + for (SectionChunk *DebugChunk : File->getDebugChunks()) { + if (!DebugChunk->isLive() || DebugChunk->getSectionName() != ".debug$S") + continue; - BinaryByteStream Stream(Data, support::little); - codeview::CVTypeArray Types; - BinaryStreamReader Reader(Stream); - SmallVector SourceToDest; - Handler.addSearchPath(llvm::sys::path::parent_path(File->getName())); - if (auto EC = Reader.readArray(Types, Reader.getLength())) - fatal(EC, "Reader::readArray failed"); - if (auto Err = codeview::mergeTypeAndIdRecords( - IDTable, TypeTable, SourceToDest, &Handler, Types)) - fatal(Err, "codeview::mergeTypeStreams failed"); + ArrayRef RelocatedDebugContents = + relocateDebugChunk(Alloc, DebugChunk); + if (RelocatedDebugContents.empty()) + continue; + + DebugSubsectionArray Subsections; + BinaryStreamReader Reader(RelocatedDebugContents, support::little); + ExitOnErr(Reader.readArray(Subsections, RelocatedDebugContents.size())); + + DebugStringTableSubsectionRef CVStrTab; + DebugChecksumsSubsectionRef Checksums; + for (const DebugSubsectionRecord &SS : Subsections) { + switch (SS.kind()) { + case DebugSubsectionKind::StringTable: + ExitOnErr(CVStrTab.initialize(SS.getRecordData())); + break; + case DebugSubsectionKind::FileChecksums: + ExitOnErr(Checksums.initialize(SS.getRecordData())); + break; + case DebugSubsectionKind::Lines: + // We can add the relocated line table directly to the PDB without + // modification because the file checksum offsets will stay the same. + File->ModuleDBI->addDebugSubsection(SS); + break; + case DebugSubsectionKind::Symbols: + mergeSymbolRecords(Alloc, File, TypeIndexMap, SS.getRecordData()); + break; + default: + // FIXME: Process the rest of the subsections. + break; + } + } + + if (Checksums.valid()) { + // Make a new file checksum table that refers to offsets in the PDB-wide + // string table. Generally the string table subsection appears after the + // checksum table, so we have to do this after looping over all the + // subsections. + if (!CVStrTab.valid()) + fatal(".debug$S sections must have both a string table subsection " + "and a checksum subsection table or neither"); + auto NewChecksums = + make_unique(*PDBStrTab); + for (FileChecksumEntry &FC : Checksums) { + StringRef FileName = ExitOnErr(CVStrTab.getString(FC.FileNameOffset)); + ExitOnErr(Builder.getDbiBuilder().addModuleSourceFile( + *File->ModuleDBI, FileName)); + NewChecksums->addChecksum(FileName, FC.Kind, FC.Checksum); + } + File->ModuleDBI->addDebugSubsection(std::move(NewChecksums)); + } + } } + Builder.getStringTableBuilder().setStrings(*PDBStrTab); + // Construct TPI stream contents. addTypeInfo(Builder.getTpiBuilder(), TypeTable); @@ -144,56 +325,10 @@ static void addObjectsToPDB(SymbolTable *Symtab, pdb:: addTypeInfo(Builder.getIpiBuilder(), IDTable); } -static void dumpDebugT(ScopedPrinter &W, ObjectFile *File) { - ListScope LS(W, "DebugT"); - ArrayRef Data = getDebugSection(File, ".debug$T"); - if (Data.empty()) - return; - - LazyRandomTypeCollection Types(Data, 100); - TypeDumpVisitor TDV(Types, &W, false); - // Use a default implementation that does not follow type servers and instead - // just dumps the contents of the TypeServer2 record. - if (auto EC = codeview::visitTypeStream(Types, TDV)) - fatal(EC, "CVTypeDumper::dump failed"); -} - -static void dumpDebugS(ScopedPrinter &W, ObjectFile *File) { - ListScope LS(W, "DebugS"); - ArrayRef Data = getDebugSection(File, ".debug$S"); - if (Data.empty()) - return; - - BinaryByteStream Stream(Data, llvm::support::little); - CVSymbolArray Symbols; - BinaryStreamReader Reader(Stream); - if (auto EC = Reader.readArray(Symbols, Reader.getLength())) - fatal(EC, "StreamReader.readArray failed"); - - TypeDatabase TDB(0); - CVSymbolDumper SymbolDumper(W, TDB, CodeViewContainer::ObjectFile, nullptr, - false); - if (auto EC = SymbolDumper.dump(Symbols)) - fatal(EC, "CVSymbolDumper::dump failed"); -} - -// Dump CodeView debug info. This is for debugging. -static void dumpCodeView(SymbolTable *Symtab) { - ScopedPrinter W(outs()); - - for (ObjectFile *File : Symtab->ObjectFiles) { - dumpDebugT(W, File); - dumpDebugS(W, File); - } -} - // Creates a PDB file. void coff::createPDB(StringRef Path, SymbolTable *Symtab, ArrayRef SectionTable, const llvm::codeview::DebugInfo *DI) { - if (Config->DumpPdb) - dumpCodeView(Symtab); - BumpPtrAllocator Alloc; pdb::PDBFileBuilder Builder(Alloc); ExitOnErr(Builder.initialize(4096)); // 4096 is blocksize @@ -219,9 +354,9 @@ void coff::createPDB(StringRef Path, SymbolTable *Symt pdb::DbiStreamBuilder &DbiBuilder = Builder.getDbiBuilder(); DbiBuilder.setVersionHeader(pdb::PdbDbiV110); - codeview::TypeTableBuilder TypeTable(BAlloc); - codeview::TypeTableBuilder IDTable(BAlloc); - addObjectsToPDB(Symtab, Builder, TypeTable, IDTable); + TypeTableBuilder TypeTable(BAlloc); + TypeTableBuilder IDTable(BAlloc); + addObjectsToPDB(Alloc, Symtab, Builder, TypeTable, IDTable); // Add Section Contributions. addSectionContribs(Symtab, DbiBuilder); Modified: vendor/lld/dist/COFF/Strings.cpp ============================================================================== --- vendor/lld/dist/COFF/Strings.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Strings.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "Strings.h" +#include #if defined(_MSC_VER) #include @@ -21,6 +22,10 @@ using namespace llvm; Optional coff::demangle(StringRef S) { #if defined(_MSC_VER) + // UnDecorateSymbolName is not thread-safe, so we need a mutex. + static std::mutex Mu; + std::lock_guard Lock(Mu); + char Buf[4096]; if (S.startswith("?")) if (size_t Len = UnDecorateSymbolName(S.str().c_str(), Buf, sizeof(Buf), 0)) Modified: vendor/lld/dist/COFF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/COFF/SymbolTable.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/SymbolTable.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -219,13 +219,13 @@ Symbol *SymbolTable::addAbsolute(StringRef N, uint64_t return S; } -Symbol *SymbolTable::addRelative(StringRef N, uint64_t VA) { +Symbol *SymbolTable::addSynthetic(StringRef N, Chunk *C) { Symbol *S; bool WasInserted; std::tie(S, WasInserted) = insert(N); S->IsUsedInRegularObj = true; if (WasInserted || isa(S->body()) || isa(S->body())) - replaceBody(S, N, VA); + replaceBody(S, N, C); else if (!isa(S->body())) reportDuplicate(S, nullptr); return S; @@ -244,6 +244,12 @@ Symbol *SymbolTable::addRegular(InputFile *F, StringRe reportDuplicate(S, F); } else if (SP == SP_NEW) { replaceBody(S, F, N, IsCOMDAT, /*IsExternal*/ true, Sym, C); + } else if (SP == SP_EXISTING && IsCOMDAT && C) { + C->markDiscarded(); + // Discard associative chunks that we've parsed so far. No need to recurse + // because an associative section cannot have children. + for (SectionChunk *Child : C->children()) + Child->markDiscarded(); } return S; } Modified: vendor/lld/dist/COFF/SymbolTable.h ============================================================================== --- vendor/lld/dist/COFF/SymbolTable.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/SymbolTable.h Mon Jun 26 20:33:45 2017 (r320382) @@ -85,7 +85,7 @@ class SymbolTable { (public) // Creates an Undefined symbol for a given name. SymbolBody *addUndefined(StringRef Name); - Symbol *addRelative(StringRef N, uint64_t VA); + Symbol *addSynthetic(StringRef N, Chunk *C); Symbol *addAbsolute(StringRef N, uint64_t VA); Symbol *addUndefined(StringRef Name, InputFile *F, bool IsWeakAlias); Modified: vendor/lld/dist/COFF/Symbols.cpp ============================================================================== --- vendor/lld/dist/COFF/Symbols.cpp Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Symbols.cpp Mon Jun 26 20:33:45 2017 (r320382) @@ -61,6 +61,8 @@ COFFSymbolRef DefinedCOFF::getCOFFSymbol() { return COFFSymbolRef(reinterpret_cast(Sym)); } +uint16_t DefinedAbsolute::OutputSectionIndex = 0; + static Chunk *makeImportThunk(DefinedImportData *S, uint16_t Machine) { if (Machine == AMD64) return make(S); Modified: vendor/lld/dist/COFF/Symbols.h ============================================================================== --- vendor/lld/dist/COFF/Symbols.h Mon Jun 26 20:33:41 2017 (r320381) +++ vendor/lld/dist/COFF/Symbols.h Mon Jun 26 20:33:45 2017 (r320382) @@ -50,13 +50,13 @@ class SymbolBody { (public) DefinedImportThunkKind, DefinedImportDataKind, DefinedAbsoluteKind, - DefinedRelativeKind, + DefinedSyntheticKind, UndefinedKind, LazyKind, LastDefinedCOFFKind = DefinedCommonKind, - LastDefinedKind = DefinedRelativeKind, + LastDefinedKind = DefinedSyntheticKind, }; Kind kind() const { return static_cast(SymbolKind); } @@ -112,11 +112,11 @@ class Defined : public SymbolBody { (public) // Returns the RVA relative to the beginning of the output section. // Used to implement SECREL relocation type. - uint64_t getSecrel(); + uint32_t getSecrel(); // Returns the output section index. // Used to implement SECTION relocation type. - uint64_t getSectionIndex(); + uint16_t getSectionIndex(); // Returns true if this symbol points to an executable (e.g. .text) section. // Used to implement ARM relocations. @@ -167,6 +167,7 @@ class DefinedRegular : public DefinedCOFF { (public) bool isCOMDAT() { return IsCOMDAT; } SectionChunk *getChunk() { return *Data; } uint32_t getValue() { return Sym->Value; } + uint32_t getSecrel(); private: SectionChunk **Data; @@ -186,6 +187,8 @@ class DefinedCommon : public DefinedCOFF { (public) } uint64_t getRVA() { return Data->getRVA(); } + uint32_t getSecrel() { return Data->OutputSectionOff; } + uint16_t getSectionIndex(); private: friend SymbolTable; @@ -212,28 +215,34 @@ class DefinedAbsolute : public Defined { (public) uint64_t getRVA() { return VA - Config->ImageBase; } void setVA(uint64_t V) { VA = V; } + // The sentinel absolute symbol section index. Section index relocations + // against absolute symbols resolve to this 16 bit number, and it is the + // largest valid section index plus one. This is written by the Writer. + static uint16_t OutputSectionIndex; + private: uint64_t VA; }; -// This is a kind of absolute symbol but relative to the image base. -// Unlike absolute symbols, relocations referring this kind of symbols -// are subject of the base relocation. This type is used rarely -- -// mainly for __ImageBase. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:33:53 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0059ED9152C; Mon, 26 Jun 2017 20:33:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0FA76509A; Mon, 26 Jun 2017 20:33:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXpOJ099200; Mon, 26 Jun 2017 20:33:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXpAb099199; Mon, 26 Jun 2017 20:33:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXpAb099199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320383 - vendor/lld/lld-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:33:53 -0000 Author: dim Date: Mon Jun 26 20:33:51 2017 New Revision: 320383 URL: https://svnweb.freebsd.org/changeset/base/320383 Log: Tag lld trunk r306325. Added: vendor/lld/lld-trunk-r306325/ - copied from r320382, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:34:01 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 776E5D91583; Mon, 26 Jun 2017 20:34:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7476D6513D; Mon, 26 Jun 2017 20:33:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKXwcZ099270; Mon, 26 Jun 2017 20:33:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKXuLd099248; Mon, 26 Jun 2017 20:33:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262033.v5QKXuLd099248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320384 - in vendor/lldb/dist: include/lldb include/lldb/Host include/lldb/Host/common include/lldb/Host/posix lldb.xcodeproj packages/Python/lldbsuite/test packages/Python/lldbsuite/te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:34:01 -0000 Author: dim Date: Mon Jun 26 20:33:56 2017 New Revision: 320384 URL: https://svnweb.freebsd.org/changeset/base/320384 Log: Vendor import of lldb trunk r306325: https://llvm.org/svn/llvm-project/lldb/trunk@306325 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/CMakeLists.txt (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h (contents, props changed) vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/ vendor/lldb/dist/unittests/Host/HostTest.cpp (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Host/posix/ProcessLauncherPosix.h vendor/lldb/dist/source/Host/posix/ProcessLauncherPosix.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/CMakeLists.txt vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h vendor/lldb/dist/test/android/ vendor/lldb/dist/test/api/ vendor/lldb/dist/test/arm_emulation/ vendor/lldb/dist/test/attic/ vendor/lldb/dist/test/benchmarks/ vendor/lldb/dist/test/c++/ vendor/lldb/dist/test/driver/ vendor/lldb/dist/test/example/ vendor/lldb/dist/test/expression_command/ vendor/lldb/dist/test/functionalities/ vendor/lldb/dist/test/help/ vendor/lldb/dist/test/lang/ vendor/lldb/dist/test/linux/ vendor/lldb/dist/test/logging/ vendor/lldb/dist/test/macosx/ vendor/lldb/dist/test/make/ vendor/lldb/dist/test/pexpect-2.4/ vendor/lldb/dist/test/plugins/ vendor/lldb/dist/test/python_api/ vendor/lldb/dist/test/settings/ vendor/lldb/dist/test/source-manager/ vendor/lldb/dist/test/terminal/ vendor/lldb/dist/test/tools/ vendor/lldb/dist/test/types/ vendor/lldb/dist/test/unittest2/ vendor/lldb/dist/test/warnings/ Modified: vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-private-enumerations.h vendor/lldb/dist/lldb.xcodeproj/project.pbxproj vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py vendor/lldb/dist/scripts/Python/python-wrapper.swig vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SystemInitializerFull.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Core/IOHandler.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Timer.cpp vendor/lldb/dist/source/Host/CMakeLists.txt vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp vendor/lldb/dist/source/Host/macosx/Host.mm vendor/lldb/dist/source/Host/posix/ProcessLauncherPosixFork.cpp vendor/lldb/dist/source/Host/windows/Host.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/CMakeLists.txt vendor/lldb/dist/source/Plugins/Language/ObjC/Cocoa.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSArray.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSDictionary.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/ObjCLanguage.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h vendor/lldb/dist/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.h vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/unittests/Host/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.h vendor/lldb/dist/unittests/tools/lldb-server/tests/TestClient.cpp Modified: vendor/lldb/dist/include/lldb/Host/Host.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Host.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/Host/Host.h Mon Jun 26 20:33:56 2017 (r320384) @@ -29,6 +29,27 @@ class FileAction; class ProcessLaunchInfo; //---------------------------------------------------------------------- +// Exit Type for inferior processes +//---------------------------------------------------------------------- +struct WaitStatus { + enum Type : uint8_t { + Exit, // The status represents the return code from normal + // program exit (i.e. WIFEXITED() was true) + Signal, // The status represents the signal number that caused + // the program to exit (i.e. WIFSIGNALED() was true) + Stop, // The status represents the signal number that caused the + // program to stop (i.e. WIFSTOPPED() was true) + }; + + Type type; + uint8_t status; + + WaitStatus(Type type, uint8_t status) : type(type), status(status) {} + + static WaitStatus Decode(int wstatus); +}; + +//---------------------------------------------------------------------- /// @class Host Host.h "lldb/Host/Host.h" /// @brief A class that provides host computer information. /// @@ -111,15 +132,6 @@ class Host { (public) static const char *GetSignalAsCString(int signo); - typedef void (*ThreadLocalStorageCleanupCallback)(void *p); - - static lldb::thread_key_t - ThreadLocalStorageCreate(ThreadLocalStorageCleanupCallback callback); - - static void *ThreadLocalStorageGet(lldb::thread_key_t key); - - static void ThreadLocalStorageSet(lldb::thread_key_t key, void *value); - //------------------------------------------------------------------ /// Given an address in the current process (the process that /// is running the LLDB code), return the name of the module that @@ -184,22 +196,6 @@ class Host { (public) static bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info); -#if (defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || \ - defined(__GLIBC__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ - !defined(__ANDROID__) - - static short GetPosixspawnFlags(const ProcessLaunchInfo &launch_info); - - static Status LaunchProcessPosixSpawn(const char *exe_path, - const ProcessLaunchInfo &launch_info, - lldb::pid_t &pid); - - static bool AddPosixSpawnFileAction(void *file_actions, - const FileAction *info, Log *log, - Status &error); - -#endif - static const lldb::UnixSignalsSP &GetUnixSignals(); static Status LaunchProcess(ProcessLaunchInfo &launch_info); @@ -245,6 +241,15 @@ class Host { (public) }; } // namespace lldb_private + +namespace llvm { +template <> struct format_provider { + /// Options = "" gives a human readable description of the status + /// Options = "g" gives a gdb-remote protocol status (e.g., X09) + static void format(const lldb_private::WaitStatus &WS, raw_ostream &OS, + llvm::StringRef Options); +}; +} // namespace llvm #endif // #if defined(__cplusplus) #endif // liblldb_Host_h_ Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon Jun 26 20:33:56 2017 (r320384) @@ -11,6 +11,7 @@ #define liblldb_NativeProcessProtocol_h_ #include "lldb/Core/TraceOptions.h" +#include "lldb/Host/Host.h" #include "lldb/Host/MainLoop.h" #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" @@ -158,12 +159,9 @@ class NativeProcessProtocol (public) //---------------------------------------------------------------------- // Exit Status //---------------------------------------------------------------------- - virtual bool GetExitStatus(lldb_private::ExitType *exit_type, int *status, - std::string &exit_description); + virtual llvm::Optional GetExitStatus(); - virtual bool SetExitStatus(lldb_private::ExitType exit_type, int status, - const char *exit_description, - bool bNotifyStateChange); + virtual bool SetExitStatus(WaitStatus status, bool bNotifyStateChange); //---------------------------------------------------------------------- // Access to threads @@ -421,9 +419,8 @@ class NativeProcessProtocol (public) lldb::StateType m_state; mutable std::recursive_mutex m_state_mutex; - lldb_private::ExitType m_exit_type; - int m_exit_status; - std::string m_exit_description; + llvm::Optional m_exit_status; + std::recursive_mutex m_delegates_mutex; std::vector m_delegates; NativeBreakpointList m_breakpoint_list; Modified: vendor/lldb/dist/include/lldb/lldb-enumerations.h ============================================================================== --- vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon Jun 26 20:33:56 2017 (r320384) @@ -454,6 +454,8 @@ enum LanguageType { enum InstrumentationRuntimeType { eInstrumentationRuntimeTypeAddressSanitizer = 0x0000, eInstrumentationRuntimeTypeThreadSanitizer = 0x0001, + eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002, + eInstrumentationRuntimeTypeMainThreadChecker = 0x0003, eNumInstrumentationRuntimeTypes }; Modified: vendor/lldb/dist/include/lldb/lldb-private-enumerations.h ============================================================================== --- vendor/lldb/dist/include/lldb/lldb-private-enumerations.h Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/include/lldb/lldb-private-enumerations.h Mon Jun 26 20:33:56 2017 (r320384) @@ -212,19 +212,6 @@ enum class LineStatus { }; //---------------------------------------------------------------------- -// Exit Type for inferior processes -//---------------------------------------------------------------------- -typedef enum ExitType { - eExitTypeInvalid, - eExitTypeExit, // The exit status represents the return code from normal - // program exit (i.e. WIFEXITED() was true) - eExitTypeSignal, // The exit status represents the signal number that caused - // the program to exit (i.e. WIFSIGNALED() was true) - eExitTypeStop, // The exit status represents the stop signal that caused the - // program to exit (i.e. WIFSTOPPED() was true) -} ExitType; - -//---------------------------------------------------------------------- // Boolean result of running a Type Validator //---------------------------------------------------------------------- enum class TypeValidatorResult : bool { Success = true, Failure = false }; Modified: vendor/lldb/dist/lldb.xcodeproj/project.pbxproj ============================================================================== --- vendor/lldb/dist/lldb.xcodeproj/project.pbxproj Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/lldb.xcodeproj/project.pbxproj Mon Jun 26 20:33:56 2017 (r320384) @@ -744,6 +744,7 @@ 4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; }; 4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; }; + 54067BF11DF2041B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */; }; 6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */; }; 6D0F61481C80AAD600A4ECEE /* DWARFASTParserJava.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */; }; 6D0F614E1C80AB0700A4ECEE /* JavaLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */; }; @@ -766,6 +767,7 @@ 8C26C4261C3EA5F90031DF7C /* ThreadSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* ThreadSanitizerRuntime.cpp */; }; 8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */; }; 8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */; }; + 8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */; }; 8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; }; 8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; }; @@ -2576,6 +2578,8 @@ 4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepUntil.h; path = include/lldb/Target/ThreadPlanStepUntil.h; sourceTree = ""; }; 4CF52AF41428291E0051E832 /* SBFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpecList.h; path = include/lldb/API/SBFileSpecList.h; sourceTree = ""; }; 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpecList.cpp; path = source/API/SBFileSpecList.cpp; sourceTree = ""; }; + 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = UndefinedBehaviorSanitizerRuntime.cpp; path = UndefinedBehaviorSanitizer/UndefinedBehaviorSanitizerRuntime.cpp; sourceTree = ""; }; + 54067BED1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UndefinedBehaviorSanitizerRuntime.h; path = UndefinedBehaviorSanitizer/UndefinedBehaviorSanitizerRuntime.h; sourceTree = ""; }; 69A01E1C1236C5D400C660B5 /* Host.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = ""; }; 69A01E1F1236C5D400C660B5 /* Symbols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbols.cpp; sourceTree = ""; }; 6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugMacros.h; path = include/lldb/Symbol/DebugMacros.h; sourceTree = ""; }; @@ -2624,6 +2628,8 @@ 8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; path = include/lldb/Target/MemoryHistory.h; sourceTree = ""; }; 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHistoryASan.cpp; sourceTree = ""; }; 8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHistoryASan.h; sourceTree = ""; }; + 8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainThreadCheckerRuntime.h; sourceTree = ""; }; + 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MainThreadCheckerRuntime.cpp; sourceTree = ""; }; 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadCollection.cpp; path = source/Target/ThreadCollection.cpp; sourceTree = ""; }; 8CCB017C19BA289B0009FD44 /* ThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadCollection.h; path = include/lldb/Target/ThreadCollection.h; sourceTree = ""; }; 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadCollection.cpp; path = source/API/SBThreadCollection.cpp; sourceTree = ""; }; @@ -5912,6 +5918,15 @@ path = "gdb-remote"; sourceTree = ""; }; + 54067BEA1DF2033700749AA5 /* UndefinedBehaviorSanitizer */ = { + isa = PBXGroup; + children = ( + 54067BEC1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp */, + 54067BED1DF2034B00749AA5 /* UndefinedBehaviorSanitizerRuntime.h */, + ); + name = UndefinedBehaviorSanitizer; + sourceTree = ""; + }; 69A01E1A1236C5D400C660B5 /* common */ = { isa = PBXGroup; children = ( @@ -6011,11 +6026,22 @@ path = asan; sourceTree = ""; }; + 8C3BD9911EF45D9B0016C343 /* MainThreadChecker */ = { + isa = PBXGroup; + children = ( + 8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */, + 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */, + ); + path = MainThreadChecker; + sourceTree = ""; + }; 8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */ = { isa = PBXGroup; children = ( + 54067BEA1DF2033700749AA5 /* UndefinedBehaviorSanitizer */, 8C26C4221C3EA4050031DF7C /* ThreadSanitizer */, 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */, + 8C3BD9911EF45D9B0016C343 /* MainThreadChecker */, ); path = InstrumentationRuntime; sourceTree = ""; @@ -7133,6 +7159,7 @@ 2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */, 4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */, AE44FB4C1BB4BB540033EB62 /* GoFormatterFunctions.cpp in Sources */, + 8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */, 23042D121976CA1D00621B2C /* PlatformKalimba.cpp in Sources */, 2689001313353DDE00698AC0 /* CommandObjectArgs.cpp in Sources */, 2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */, @@ -7623,6 +7650,7 @@ 26954EBE1401EE8B00294D09 /* DynamicRegisterInfo.cpp in Sources */, 6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */, 255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */, + 54067BF11DF2041B00749AA5 /* UndefinedBehaviorSanitizerRuntime.cpp in Sources */, 3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */, 26274FA714030F79006BA130 /* DynamicLoaderDarwinKernel.cpp in Sources */, 94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */, Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/decorators.py Mon Jun 26 20:33:56 2017 (r320384) @@ -681,6 +681,53 @@ def skipUnlessThreadSanitizer(func): return None return skipTestIfFn(is_compiler_clang_with_thread_sanitizer)(func) +def skipUnlessUndefinedBehaviorSanitizer(func): + """Decorate the item to skip test unless -fsanitize=undefined is supported.""" + + def is_compiler_clang_with_ubsan(self): + # Write out a temp file which exhibits UB. + inputf = tempfile.NamedTemporaryFile(suffix='.c') + inputf.write('int main() { int x = 0; return x / x; }\n') + inputf.flush() + + # We need to write out the object into a named temp file for inspection. + outputf = tempfile.NamedTemporaryFile() + + # Try to compile with ubsan turned on. + cmd = '%s -fsanitize=undefined %s -o %s' % (self.getCompiler(), inputf.name, outputf.name) + if os.popen(cmd).close() is not None: + return "Compiler cannot compile with -fsanitize=undefined" + + # Check that we actually see ubsan instrumentation in the binary. + cmd = 'nm %s' % outputf.name + with os.popen(cmd) as nm_output: + if '___ubsan_handle_divrem_overflow' not in nm_output.read(): + return "Division by zero instrumentation is missing" + + # Find the ubsan dylib. + # FIXME: This check should go away once compiler-rt gains support for __ubsan_on_report. + cmd = '%s -fsanitize=undefined -x c - -o - -### 2>&1' % self.getCompiler() + with os.popen(cmd) as cc_output: + driver_jobs = cc_output.read() + m = re.search(r'"([^"]+libclang_rt.ubsan_osx_dynamic.dylib)"', driver_jobs) + if not m: + return "Could not find the ubsan dylib used by the driver" + ubsan_dylib = m.group(1) + + # Check that the ubsan dylib has special monitor hooks. + cmd = 'nm -gU %s' % ubsan_dylib + with os.popen(cmd) as nm_output: + syms = nm_output.read() + if '___ubsan_on_report' not in syms: + return "Missing ___ubsan_on_report" + if '___ubsan_get_current_report_data' not in syms: + return "Missing ___ubsan_get_current_report_data" + + # OK, this dylib + compiler works for us. + return None + + return skipTestIfFn(is_compiler_clang_with_ubsan)(func) + def skipUnlessAddressSanitizer(func): """Decorate the item to skip test unless Clang -fsanitize=thread is supported.""" Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Mon Jun 26 20:33:56 2017 (r320384) @@ -186,15 +186,26 @@ class ObjCDataFormatterTestCase(TestBase): def nsnumber_data_formatter_commands(self): # Now enable AppKit and check we are displaying Cocoa classes correctly - self.expect('frame variable num1 num2 num3 num4 num5 num6 num7 num9', + self.expect('frame variable num1 num2 num3 num5 num6 num7 num9', substrs=['(NSNumber *) num1 = ', ' (int)5', '(NSNumber *) num2 = ', ' (float)3.1', '(NSNumber *) num3 = ', ' (double)3.14', - '(NSNumber *) num4 = ', ' (long)-2', '(NSNumber *) num5 = ', ' (char)65', '(NSNumber *) num6 = ', ' (long)255', '(NSNumber *) num7 = ', '2000000', '(NSNumber *) num9 = ', ' (short)-31616']) + + + self.runCmd('frame variable num4', check=True) + output = self.res.GetOutput() + i128_handled_correctly = False + + if output.find('long') >= 0: + i128_handled_correctly = (output.find('(long)-2') >= 0) + if output.find('int128_t') >= 0: + i128_handled_correctly = (output.find('(int128_t)18446744073709551614') >= 0) # deliberately broken, should be ..14 + + self.assertTrue(i128_handled_correctly, "Expected valid output for int128_t; got " + output) self.expect('frame variable num_at1 num_at2 num_at3 num_at4', substrs=['(NSNumber *) num_at1 = ', ' (int)12', Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,6 @@ +LEVEL = ../../../make + +C_SOURCES := main.c +CFLAGS_EXTRAS := -fsanitize=undefined -g + +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,90 @@ +""" +Tests basic UndefinedBehaviorSanitizer support (detecting an alignment error). +""" + +import os +import time +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +import lldbsuite.test.lldbutil as lldbutil +import json + + +class UbsanBasicTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @skipUnlessUndefinedBehaviorSanitizer + def test(self): + self.build() + self.ubsan_tests() + + def setUp(self): + # Call super's setUp(). + TestBase.setUp(self) + self.line_align = line_number('main.c', '// align line') + + def ubsan_tests(self): + # Load the test + exe = os.path.join(os.getcwd(), "a.out") + self.expect( + "file " + exe, + patterns=["Current executable set to .*a.out"]) + + self.runCmd("run") + + process = self.dbg.GetSelectedTarget().process + thread = process.GetSelectedThread() + frame = thread.GetSelectedFrame() + + # the stop reason of the thread should be breakpoint. + self.expect("thread list", "A ubsan issue should be detected", + substrs=['stopped', 'stop reason =']) + + stop_reason = thread.GetStopReason() + self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation) + + # test that the UBSan dylib is present + self.expect( + "image lookup -n __ubsan_on_report", + "__ubsan_on_report should be present", + substrs=['1 match found']) + + # We should be stopped in __ubsan_on_report + self.assertTrue("__ubsan_on_report" in frame.GetFunctionName()) + + # The stopped thread backtrace should contain either 'align line' + found = False + for i in range(thread.GetNumFrames()): + frame = thread.GetFrameAtIndex(i) + if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c": + if frame.GetLineEntry().GetLine() == self.line_align: + found = True + self.assertTrue(found) + + backtraces = thread.GetStopReasonExtendedBacktraces( + lldb.eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer) + self.assertTrue(backtraces.GetSize() == 1) + + self.expect( + "thread info -s", + "The extended stop info should contain the UBSan provided fields", + substrs=[ + "instrumentation_class", + "memory_address", + "description", + "filename", + "line", + "col"]) + + output_lines = self.res.GetOutput().split('\n') + json_line = '\n'.join(output_lines[2:]) + data = json.loads(json_line) + + self.assertEqual(data["instrumentation_class"], "UndefinedBehaviorSanitizer") + self.assertEqual(data["description"], "misaligned-pointer-use") + self.assertEqual(data["filename"], "main.c") + self.assertEqual(data["line"], self.line_align) + + self.runCmd("continue") Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c Mon Jun 26 20:33:56 2017 (r320384) @@ -0,0 +1,4 @@ +int main() { + int data[4]; + return *(int *)(((char *)&data[0]) + 2); // align line +} Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Mon Jun 26 20:33:56 2017 (r320384) @@ -121,8 +121,6 @@ class ObjCNewSyntaxTestCase(TestBase): '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) - @expectedFailureAll( - bugnumber="rdar://32777981") def test_update_dictionary(self): self.runToBreakpoint() @@ -165,8 +163,6 @@ class ObjCNewSyntaxTestCase(TestBase): '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) - @expectedFailureAll( - bugnumber="rdar://32777981") def test_dictionary_literal(self): self.runToBreakpoint() Modified: vendor/lldb/dist/scripts/Python/python-wrapper.swig ============================================================================== --- vendor/lldb/dist/scripts/Python/python-wrapper.swig Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/scripts/Python/python-wrapper.swig Mon Jun 26 20:33:56 2017 (r320384) @@ -929,7 +929,8 @@ void LLDBSwigPythonCallPythonLogOutputCallback(const c void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton) { if (baton != Py_None) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyObject_CallFunction(reinterpret_cast(baton), const_cast("s"), str); + PyObject *result = PyObject_CallFunction(reinterpret_cast(baton), const_cast("s"), str); + Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } } Modified: vendor/lldb/dist/source/API/SBThread.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBThread.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/API/SBThread.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -293,10 +293,6 @@ SBThread::GetStopReasonExtendedBacktraces(Instrumentat ThreadCollectionSP threads; threads.reset(new ThreadCollection()); - // We currently only support ThreadSanitizer. - if (type != eInstrumentationRuntimeTypeThreadSanitizer) - return threads; - std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); Modified: vendor/lldb/dist/source/API/SystemInitializerFull.cpp ============================================================================== --- vendor/lldb/dist/source/API/SystemInitializerFull.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/API/SystemInitializerFull.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -49,8 +49,10 @@ #include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h" #include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h" #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" -#include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h" -#include "Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h" +#include "Plugins/InstrumentationRuntime/ASan/ASanRuntime.h" +#include "Plugins/InstrumentationRuntime/TSan/TSanRuntime.h" +#include "Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h" +#include "Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h" #include "Plugins/JITLoader/GDB/JITLoaderGDB.h" #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/Go/GoLanguage.h" @@ -310,6 +312,8 @@ void SystemInitializerFull::Initialize() { MemoryHistoryASan::Initialize(); AddressSanitizerRuntime::Initialize(); ThreadSanitizerRuntime::Initialize(); + UndefinedBehaviorSanitizerRuntime::Initialize(); + MainThreadCheckerRuntime::Initialize(); SymbolVendorELF::Initialize(); SymbolFileDWARF::Initialize(); @@ -434,6 +438,8 @@ void SystemInitializerFull::Terminate() { MemoryHistoryASan::Terminate(); AddressSanitizerRuntime::Terminate(); ThreadSanitizerRuntime::Terminate(); + UndefinedBehaviorSanitizerRuntime::Terminate(); + MainThreadCheckerRuntime::Terminate(); SymbolVendorELF::Terminate(); SymbolFileDWARF::Terminate(); SymbolFilePDB::Terminate(); Modified: vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp ============================================================================== --- vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -655,32 +655,30 @@ class CommandObjectFrameVariable : public CommandObjec if (num_variables > 0) { for (size_t i = 0; i < num_variables; i++) { var_sp = variable_list->GetVariableAtIndex(i); - switch (var_sp->GetScope()) - { - case eValueTypeVariableGlobal: - if (!m_option_variable.show_globals) - continue; - break; - case eValueTypeVariableStatic: - if (!m_option_variable.show_globals) - continue; - break; - case eValueTypeVariableArgument: - if (!m_option_variable.show_args) - continue; - break; - case eValueTypeVariableLocal: - if (!m_option_variable.show_locals) - continue; - break; - default: + switch (var_sp->GetScope()) { + case eValueTypeVariableGlobal: + if (!m_option_variable.show_globals) continue; - break; - + break; + case eValueTypeVariableStatic: + if (!m_option_variable.show_globals) + continue; + break; + case eValueTypeVariableArgument: + if (!m_option_variable.show_args) + continue; + break; + case eValueTypeVariableLocal: + if (!m_option_variable.show_locals) + continue; + break; + default: + continue; + break; } - std::string scope_string; - if (m_option_variable.show_scope) - scope_string = GetScopeString(var_sp).str(); + std::string scope_string; + if (m_option_variable.show_scope) + scope_string = GetScopeString(var_sp).str(); // Use the variable object code to make sure we are // using the same APIs as the public API will be Modified: vendor/lldb/dist/source/Core/IOHandler.cpp ============================================================================== --- vendor/lldb/dist/source/Core/IOHandler.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/IOHandler.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -58,7 +58,7 @@ #include "llvm/ADT/StringRef.h" // for StringRef #ifdef _MSC_VER -#include +#include "lldb/Host/windows/windows.h" #endif #include // for shared_ptr Modified: vendor/lldb/dist/source/Core/Mangled.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Mangled.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/Mangled.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -10,7 +10,7 @@ #include "lldb/Core/Mangled.h" #if defined(_WIN32) -#include +#include "lldb/Host/windows/windows.h" #include #pragma comment(lib, "dbghelp.lib") Modified: vendor/lldb/dist/source/Core/Timer.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Timer.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Core/Timer.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -38,22 +38,11 @@ static std::mutex &GetFileMutex() { return *g_file_mutex_ptr; } -static void ThreadSpecificCleanup(void *p) { - delete static_cast(p); +static TimerStack &GetTimerStackForCurrentThread() { + static thread_local TimerStack g_stack; + return g_stack; } -static TimerStack *GetTimerStackForCurrentThread() { - static lldb::thread_key_t g_key = - Host::ThreadLocalStorageCreate(ThreadSpecificCleanup); - - void *timer_stack = Host::ThreadLocalStorageGet(g_key); - if (timer_stack == NULL) { - Host::ThreadLocalStorageSet(g_key, new TimerStack); - timer_stack = Host::ThreadLocalStorageGet(g_key); - } - return (TimerStack *)timer_stack; -} - Timer::Category::Category(const char *cat) : m_name(cat) { m_nanos.store(0, std::memory_order_release); Category *expected = g_categories; @@ -66,16 +55,14 @@ void Timer::SetQuiet(bool value) { g_quiet = value; } Timer::Timer(Timer::Category &category, const char *format, ...) : m_category(category), m_total_start(std::chrono::steady_clock::now()) { - TimerStack *stack = GetTimerStackForCurrentThread(); - if (!stack) - return; + TimerStack &stack = GetTimerStackForCurrentThread(); - stack->push_back(this); - if (g_quiet && stack->size() <= g_display_depth) { + stack.push_back(this); + if (g_quiet && stack.size() <= g_display_depth) { std::lock_guard lock(GetFileMutex()); // Indent - ::fprintf(stdout, "%*s", int(stack->size() - 1) * TIMER_INDENT_AMOUNT, ""); + ::fprintf(stdout, "%*s", int(stack.size() - 1) * TIMER_INDENT_AMOUNT, ""); // Print formatted string va_list args; va_start(args, format); @@ -90,26 +77,23 @@ Timer::Timer(Timer::Category &category, const char *fo Timer::~Timer() { using namespace std::chrono; - TimerStack *stack = GetTimerStackForCurrentThread(); - if (!stack) - return; - auto stop_time = steady_clock::now(); auto total_dur = stop_time - m_total_start; auto timer_dur = total_dur - m_child_duration; - if (g_quiet && stack->size() <= g_display_depth) { + TimerStack &stack = GetTimerStackForCurrentThread(); + if (g_quiet && stack.size() <= g_display_depth) { std::lock_guard lock(GetFileMutex()); ::fprintf(stdout, "%*s%.9f sec (%.9f sec)\n", - int(stack->size() - 1) * TIMER_INDENT_AMOUNT, "", + int(stack.size() - 1) * TIMER_INDENT_AMOUNT, "", duration(total_dur).count(), duration(timer_dur).count()); } - assert(stack->back() == this); - stack->pop_back(); - if (!stack->empty()) - stack->back()->ChildDuration(total_dur); + assert(stack.back() == this); + stack.pop_back(); + if (!stack.empty()) + stack.back()->ChildDuration(total_dur); // Keep total results for each category so we can dump results. m_category.m_nanos += std::chrono::nanoseconds(timer_dur).count(); Modified: vendor/lldb/dist/source/Host/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/source/Host/CMakeLists.txt Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Host/CMakeLists.txt Mon Jun 26 20:33:56 2017 (r320384) @@ -90,12 +90,6 @@ else() posix/ProcessLauncherPosixFork.cpp ) - if (NOT (CMAKE_SYSTEM_NAME MATCHES "Android")) - add_host_subdirectory(posix - posix/ProcessLauncherPosix.cpp - ) - endif() - if (CMAKE_SYSTEM_NAME MATCHES "Darwin") include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) add_host_subdirectory(macosx Modified: vendor/lldb/dist/source/Host/common/Host.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/Host.cpp Mon Jun 26 20:33:51 2017 (r320383) +++ vendor/lldb/dist/source/Host/common/Host.cpp Mon Jun 26 20:33:56 2017 (r320384) @@ -68,15 +68,14 @@ #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" #include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Errno.h" #include "llvm/Support/FileSystem.h" #if defined(_WIN32) #include "lldb/Host/windows/ProcessLauncherWindows.h" -#elif defined(__linux__) || defined(__NetBSD__) -#include "lldb/Host/posix/ProcessLauncherPosixFork.h" #else -#include "lldb/Host/posix/ProcessLauncherPosix.h" +#include "lldb/Host/posix/ProcessLauncherPosixFork.h" #endif #if defined(__APPLE__) @@ -407,25 +406,6 @@ const char *Host::GetSignalAsCString(int signo) { #endif -#ifndef _WIN32 - -lldb::thread_key_t -Host::ThreadLocalStorageCreate(ThreadLocalStorageCleanupCallback callback) { - pthread_key_t key; - ::pthread_key_create(&key, callback); - return key; -} - -void *Host::ThreadLocalStorageGet(lldb::thread_key_t key) { - return ::pthread_getspecific(key); -} - -void Host::ThreadLocalStorageSet(lldb::thread_key_t key, void *value) { - ::pthread_setspecific(key, value); -} - -#endif - #if !defined(__APPLE__) // see Host.mm bool Host::GetBundleDirectory(const FileSpec &file, FileSpec &bundle) { @@ -602,359 +582,14 @@ Status Host::RunShellCommand(const Args &args, const F return error; } -// LaunchProcessPosixSpawn for Apple, Linux, FreeBSD, NetBSD and other GLIBC -// systems - -#if defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || \ - defined(__GLIBC__) || defined(__NetBSD__) -#if !defined(__ANDROID__) -// this method needs to be visible to macosx/Host.cpp and -// common/Host.cpp. - -short Host::GetPosixspawnFlags(const ProcessLaunchInfo &launch_info) { - short flags = POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK; - -#if defined(__APPLE__) - if (launch_info.GetFlags().Test(eLaunchFlagExec)) - flags |= POSIX_SPAWN_SETEXEC; // Darwin specific posix_spawn flag - - if (launch_info.GetFlags().Test(eLaunchFlagDebug)) - flags |= POSIX_SPAWN_START_SUSPENDED; // Darwin specific posix_spawn flag - - if (launch_info.GetFlags().Test(eLaunchFlagDisableASLR)) - flags |= _POSIX_SPAWN_DISABLE_ASLR; // Darwin specific posix_spawn flag - - if (launch_info.GetLaunchInSeparateProcessGroup()) - flags |= POSIX_SPAWN_SETPGROUP; - -#ifdef POSIX_SPAWN_CLOEXEC_DEFAULT -#if defined(__APPLE__) && (defined(__x86_64__) || defined(__i386__)) - static LazyBool g_use_close_on_exec_flag = eLazyBoolCalculate; - if (g_use_close_on_exec_flag == eLazyBoolCalculate) { - g_use_close_on_exec_flag = eLazyBoolNo; - - uint32_t major, minor, update; - if (HostInfo::GetOSVersion(major, minor, update)) { - // Kernel panic if we use the POSIX_SPAWN_CLOEXEC_DEFAULT on 10.7 or - // earlier - if (major > 10 || (major == 10 && minor > 7)) { - // Only enable for 10.8 and later OS versions - g_use_close_on_exec_flag = eLazyBoolYes; - } - } - } -#else - static LazyBool g_use_close_on_exec_flag = eLazyBoolYes; -#endif - // Close all files exception those with file actions if this is supported. - if (g_use_close_on_exec_flag == eLazyBoolYes) - flags |= POSIX_SPAWN_CLOEXEC_DEFAULT; -#endif -#endif // #if defined (__APPLE__) - return flags; -} - -Status Host::LaunchProcessPosixSpawn(const char *exe_path, - const ProcessLaunchInfo &launch_info, - lldb::pid_t &pid) { - Status error; - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST | - LIBLLDB_LOG_PROCESS)); - - posix_spawnattr_t attr; - error.SetError(::posix_spawnattr_init(&attr), eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnattr_init ( &attr )", error); - return error; - } - - // Make a quick class that will cleanup the posix spawn attributes in case - // we return in the middle of this function. - lldb_utility::CleanUp posix_spawnattr_cleanup( - &attr, posix_spawnattr_destroy); - - sigset_t no_signals; - sigset_t all_signals; - sigemptyset(&no_signals); - sigfillset(&all_signals); - ::posix_spawnattr_setsigmask(&attr, &no_signals); -#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) - ::posix_spawnattr_setsigdefault(&attr, &no_signals); -#else - ::posix_spawnattr_setsigdefault(&attr, &all_signals); -#endif - - short flags = GetPosixspawnFlags(launch_info); - - error.SetError(::posix_spawnattr_setflags(&attr, flags), eErrorTypePOSIX); - if (error.Fail()) { - LLDB_LOG(log, - "error: {0}, ::posix_spawnattr_setflags ( &attr, flags={1:x} )", - error, flags); - return error; - } - -// posix_spawnattr_setbinpref_np appears to be an Apple extension per: -// http://www.unix.com/man-page/OSX/3/posix_spawnattr_setbinpref_np/ -#if defined(__APPLE__) && !defined(__arm__) - - // Don't set the binpref if a shell was provided. After all, that's only - // going to affect what version of the shell - // is launched, not what fork of the binary is launched. We insert "arch - // --arch as part of the shell invocation - // to do that job on OSX. - - if (launch_info.GetShell() == nullptr) { - // We don't need to do this for ARM, and we really shouldn't now that we - // have multiple CPU subtypes and no posix_spawnattr call that allows us - // to set which CPU subtype to launch... - const ArchSpec &arch_spec = launch_info.GetArchitecture(); - cpu_type_t cpu = arch_spec.GetMachOCPUType(); - cpu_type_t sub = arch_spec.GetMachOCPUSubType(); - if (cpu != 0 && cpu != static_cast(UINT32_MAX) && - cpu != static_cast(LLDB_INVALID_CPUTYPE) && - !(cpu == 0x01000007 && sub == 8)) // If haswell is specified, don't try - // to set the CPU type or we will fail - { - size_t ocount = 0; - error.SetError(::posix_spawnattr_setbinpref_np(&attr, 1, &cpu, &ocount), - eErrorTypePOSIX); - if (error.Fail()) - LLDB_LOG(log, "error: {0}, ::posix_spawnattr_setbinpref_np ( &attr, 1, " - "cpu_type = {1:x}, count => {2} )", - error, cpu, ocount); - - if (error.Fail() || ocount != 1) - return error; - } - } - -#endif - - const char *tmp_argv[2]; - char *const *argv = const_cast( - launch_info.GetArguments().GetConstArgumentVector()); - char *const *envp = const_cast( - launch_info.GetEnvironmentEntries().GetConstArgumentVector()); - if (argv == NULL) { - // posix_spawn gets very unhappy if it doesn't have at least the program - // name in argv[0]. One of the side affects I have noticed is the - // environment - // variables don't make it into the child process if "argv == NULL"!!! - tmp_argv[0] = exe_path; - tmp_argv[1] = NULL; - argv = const_cast(tmp_argv); - } - +// The functions below implement process launching for non-Apple-based platforms #if !defined(__APPLE__) - // manage the working directory - char current_dir[PATH_MAX]; - current_dir[0] = '\0'; -#endif - - FileSpec working_dir{launch_info.GetWorkingDirectory()}; - if (working_dir) { -#if defined(__APPLE__) - // Set the working directory on this thread only - if (__pthread_chdir(working_dir.GetCString()) < 0) { - if (errno == ENOENT) { - error.SetErrorStringWithFormat("No such file or directory: %s", - working_dir.GetCString()); - } else if (errno == ENOTDIR) { - error.SetErrorStringWithFormat("Path doesn't name a directory: %s", - working_dir.GetCString()); - } else { - error.SetErrorStringWithFormat("An unknown error occurred when " - "changing directory for process " - "execution."); - } - return error; - } -#else - if (::getcwd(current_dir, sizeof(current_dir)) == NULL) { - error.SetError(errno, eErrorTypePOSIX); - LLDB_LOG(log, "error: {0}, unable to save the current directory", error); - return error; - } - - if (::chdir(working_dir.GetCString()) == -1) { - error.SetError(errno, eErrorTypePOSIX); - LLDB_LOG(log, "error: {0}, unable to change working directory to {1}", - error, working_dir); - return error; - } -#endif - } - - ::pid_t result_pid = LLDB_INVALID_PROCESS_ID; - const size_t num_file_actions = launch_info.GetNumFileActions(); - if (num_file_actions > 0) { - posix_spawn_file_actions_t file_actions; - error.SetError(::posix_spawn_file_actions_init(&file_actions), - eErrorTypePOSIX); - if (error.Fail()) { - LLDB_LOG(log, - "error: {0}, ::posix_spawn_file_actions_init ( &file_actions )", - error); - return error; - } - - // Make a quick class that will cleanup the posix spawn attributes in case - // we return in the middle of this function. - lldb_utility::CleanUp - posix_spawn_file_actions_cleanup(&file_actions, - posix_spawn_file_actions_destroy); - - for (size_t i = 0; i < num_file_actions; ++i) { - const FileAction *launch_file_action = - launch_info.GetFileActionAtIndex(i); - if (launch_file_action) { - if (!AddPosixSpawnFileAction(&file_actions, launch_file_action, log, - error)) - return error; - } - } - - error.SetError( - ::posix_spawnp(&result_pid, exe_path, &file_actions, &attr, argv, envp), - eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnp(pid => {1}, path = '{2}', " - "file_actions = {3}, " - "attr = {4}, argv = {5}, envp = {6} )", - error, result_pid, exe_path, &file_actions, &attr, argv, envp); - if (log) { - for (int ii = 0; argv[ii]; ++ii) - LLDB_LOG(log, "argv[{0}] = '{1}'", ii, argv[ii]); - } - } - - } else { - error.SetError( - ::posix_spawnp(&result_pid, exe_path, NULL, &attr, argv, envp), - eErrorTypePOSIX); - - if (error.Fail()) { - LLDB_LOG(log, "error: {0}, ::posix_spawnp ( pid => {1}, path = '{2}', " - "file_actions = NULL, attr = {3}, argv = {4}, envp = {5} )", - error, result_pid, exe_path, &attr, argv, envp); - if (log) { - for (int ii = 0; argv[ii]; ++ii) - LLDB_LOG(log, "argv[{0}] = '{1}'", ii, argv[ii]); - } - } - } - pid = result_pid; - - if (working_dir) { -#if defined(__APPLE__) - // No more thread specific current working directory - __pthread_fchdir(-1); -#else - if (::chdir(current_dir) == -1 && error.Success()) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 26 20:34:04 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 537E5D9159F; Mon, 26 Jun 2017 20:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7CFD65189; Mon, 26 Jun 2017 20:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QKY2WM099320; Mon, 26 Jun 2017 20:34:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QKY291099319; Mon, 26 Jun 2017 20:34:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706262034.v5QKY291099319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 26 Jun 2017 20:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320385 - vendor/lldb/lldb-trunk-r306325 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 20:34:04 -0000 Author: dim Date: Mon Jun 26 20:34:02 2017 New Revision: 320385 URL: https://svnweb.freebsd.org/changeset/base/320385 Log: Tag lldb trunk r306325. Added: vendor/lldb/lldb-trunk-r306325/ - copied from r320384, vendor/lldb/dist/ From owner-svn-src-vendor@freebsd.org Wed Jun 28 08:48:12 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08461D9C34B; Wed, 28 Jun 2017 08:48:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7CAB7044F; Wed, 28 Jun 2017 08:48:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S8mA2b004537; Wed, 28 Jun 2017 08:48:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S8m9bH004526; Wed, 28 Jun 2017 08:48:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280848.v5S8m9bH004526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 08:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320447 - in vendor/pjdfstest/dist: . tests tests/chflags tests/chmod tests/chown tests/ftruncate tests/granular tests/link tests/mkdir tests/mkfifo tests/mknod tests/open tests/rename ... X-SVN-Group: vendor X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in vendor/pjdfstest/dist: . tests tests/chflags tests/chmod tests/chown tests/ftruncate tests/granular tests/link tests/mkdir tests/mkfifo tests/mknod tests/open tests/rename tests/rmdir tests/symlink... X-SVN-Commit-Revision: 320447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 08:48:12 -0000 Author: ngie Date: Wed Jun 28 08:48:09 2017 New Revision: 320447 URL: https://svnweb.freebsd.org/changeset/base/320447 Log: Pull down pjdfstest 0.1 The summary of changes is as follows.. Generic changes:: - Added configure support [2]. - Check for lchmod filesystem support with create_file(..); for testcases that require lchmod, skip the testcase -- otherwise use chmod directly [1]. - Added Travis CI integration [2]. - Added utimensat testcases [1]. Linux support:: - Fixed Linux support to pass on later supported versions of Fedora/Ubuntu [2]. - Conditionally enable posix_fallocate(2) support [2]. OSX support:: - Fixed compilation on OSX [2]. - Added partial OSX support (the test run isn't fully green yet) [2]. Obtained from: https://github.com/pjd/pjdfstest/tree/0.1 Submitted by: asomers [1], ngie [2] Added: vendor/pjdfstest/dist/.gitignore vendor/pjdfstest/dist/.travis.yml vendor/pjdfstest/dist/AUTHORS vendor/pjdfstest/dist/COPYING vendor/pjdfstest/dist/ChangeLog vendor/pjdfstest/dist/Makefile.am (contents, props changed) vendor/pjdfstest/dist/NEWS vendor/pjdfstest/dist/configure.ac vendor/pjdfstest/dist/tests/utimensat/ vendor/pjdfstest/dist/tests/utimensat/00.t vendor/pjdfstest/dist/tests/utimensat/01.t vendor/pjdfstest/dist/tests/utimensat/02.t vendor/pjdfstest/dist/tests/utimensat/03.t vendor/pjdfstest/dist/tests/utimensat/04.t vendor/pjdfstest/dist/tests/utimensat/05.t vendor/pjdfstest/dist/tests/utimensat/06.t vendor/pjdfstest/dist/tests/utimensat/07.t vendor/pjdfstest/dist/tests/utimensat/08.t vendor/pjdfstest/dist/tests/utimensat/09.t vendor/pjdfstest/dist/travis/ vendor/pjdfstest/dist/travis/build.sh (contents, props changed) vendor/pjdfstest/dist/travis/test.sh (contents, props changed) Modified: vendor/pjdfstest/dist/README vendor/pjdfstest/dist/pjdfstest.c vendor/pjdfstest/dist/tests/chflags/00.t vendor/pjdfstest/dist/tests/chflags/01.t vendor/pjdfstest/dist/tests/chflags/02.t vendor/pjdfstest/dist/tests/chflags/03.t vendor/pjdfstest/dist/tests/chflags/04.t vendor/pjdfstest/dist/tests/chflags/05.t vendor/pjdfstest/dist/tests/chflags/06.t vendor/pjdfstest/dist/tests/chflags/07.t vendor/pjdfstest/dist/tests/chflags/08.t vendor/pjdfstest/dist/tests/chflags/09.t vendor/pjdfstest/dist/tests/chflags/10.t vendor/pjdfstest/dist/tests/chflags/11.t vendor/pjdfstest/dist/tests/chflags/12.t vendor/pjdfstest/dist/tests/chflags/13.t vendor/pjdfstest/dist/tests/chmod/00.t vendor/pjdfstest/dist/tests/chmod/01.t vendor/pjdfstest/dist/tests/chmod/02.t vendor/pjdfstest/dist/tests/chmod/03.t vendor/pjdfstest/dist/tests/chmod/04.t vendor/pjdfstest/dist/tests/chmod/05.t vendor/pjdfstest/dist/tests/chmod/06.t vendor/pjdfstest/dist/tests/chmod/07.t vendor/pjdfstest/dist/tests/chmod/08.t vendor/pjdfstest/dist/tests/chmod/09.t vendor/pjdfstest/dist/tests/chmod/10.t vendor/pjdfstest/dist/tests/chmod/11.t vendor/pjdfstest/dist/tests/chmod/12.t vendor/pjdfstest/dist/tests/chown/00.t vendor/pjdfstest/dist/tests/chown/01.t vendor/pjdfstest/dist/tests/chown/02.t vendor/pjdfstest/dist/tests/chown/03.t vendor/pjdfstest/dist/tests/chown/04.t vendor/pjdfstest/dist/tests/chown/05.t vendor/pjdfstest/dist/tests/chown/06.t vendor/pjdfstest/dist/tests/chown/07.t vendor/pjdfstest/dist/tests/chown/08.t vendor/pjdfstest/dist/tests/chown/09.t vendor/pjdfstest/dist/tests/chown/10.t vendor/pjdfstest/dist/tests/conf vendor/pjdfstest/dist/tests/ftruncate/00.t vendor/pjdfstest/dist/tests/ftruncate/01.t vendor/pjdfstest/dist/tests/ftruncate/02.t vendor/pjdfstest/dist/tests/ftruncate/03.t vendor/pjdfstest/dist/tests/ftruncate/04.t vendor/pjdfstest/dist/tests/ftruncate/05.t vendor/pjdfstest/dist/tests/ftruncate/06.t vendor/pjdfstest/dist/tests/ftruncate/07.t vendor/pjdfstest/dist/tests/ftruncate/08.t vendor/pjdfstest/dist/tests/ftruncate/09.t vendor/pjdfstest/dist/tests/ftruncate/10.t vendor/pjdfstest/dist/tests/ftruncate/11.t vendor/pjdfstest/dist/tests/ftruncate/12.t vendor/pjdfstest/dist/tests/ftruncate/13.t vendor/pjdfstest/dist/tests/ftruncate/14.t vendor/pjdfstest/dist/tests/granular/00.t vendor/pjdfstest/dist/tests/granular/01.t vendor/pjdfstest/dist/tests/granular/02.t vendor/pjdfstest/dist/tests/granular/03.t vendor/pjdfstest/dist/tests/granular/04.t vendor/pjdfstest/dist/tests/granular/05.t vendor/pjdfstest/dist/tests/link/00.t vendor/pjdfstest/dist/tests/link/01.t vendor/pjdfstest/dist/tests/link/02.t vendor/pjdfstest/dist/tests/link/03.t vendor/pjdfstest/dist/tests/link/04.t vendor/pjdfstest/dist/tests/link/05.t vendor/pjdfstest/dist/tests/link/06.t vendor/pjdfstest/dist/tests/link/07.t vendor/pjdfstest/dist/tests/link/08.t vendor/pjdfstest/dist/tests/link/09.t vendor/pjdfstest/dist/tests/link/10.t vendor/pjdfstest/dist/tests/link/11.t vendor/pjdfstest/dist/tests/link/12.t vendor/pjdfstest/dist/tests/link/13.t vendor/pjdfstest/dist/tests/link/14.t vendor/pjdfstest/dist/tests/link/15.t vendor/pjdfstest/dist/tests/link/16.t vendor/pjdfstest/dist/tests/link/17.t vendor/pjdfstest/dist/tests/misc.sh vendor/pjdfstest/dist/tests/mkdir/00.t vendor/pjdfstest/dist/tests/mkdir/01.t vendor/pjdfstest/dist/tests/mkdir/02.t vendor/pjdfstest/dist/tests/mkdir/03.t vendor/pjdfstest/dist/tests/mkdir/04.t vendor/pjdfstest/dist/tests/mkdir/05.t vendor/pjdfstest/dist/tests/mkdir/06.t vendor/pjdfstest/dist/tests/mkdir/07.t vendor/pjdfstest/dist/tests/mkdir/08.t vendor/pjdfstest/dist/tests/mkdir/09.t vendor/pjdfstest/dist/tests/mkdir/10.t vendor/pjdfstest/dist/tests/mkdir/11.t vendor/pjdfstest/dist/tests/mkdir/12.t vendor/pjdfstest/dist/tests/mkfifo/00.t vendor/pjdfstest/dist/tests/mkfifo/01.t vendor/pjdfstest/dist/tests/mkfifo/02.t vendor/pjdfstest/dist/tests/mkfifo/03.t vendor/pjdfstest/dist/tests/mkfifo/04.t vendor/pjdfstest/dist/tests/mkfifo/05.t vendor/pjdfstest/dist/tests/mkfifo/06.t vendor/pjdfstest/dist/tests/mkfifo/07.t vendor/pjdfstest/dist/tests/mkfifo/08.t vendor/pjdfstest/dist/tests/mkfifo/09.t vendor/pjdfstest/dist/tests/mkfifo/10.t vendor/pjdfstest/dist/tests/mkfifo/11.t vendor/pjdfstest/dist/tests/mkfifo/12.t vendor/pjdfstest/dist/tests/mknod/00.t vendor/pjdfstest/dist/tests/mknod/01.t vendor/pjdfstest/dist/tests/mknod/02.t vendor/pjdfstest/dist/tests/mknod/03.t vendor/pjdfstest/dist/tests/mknod/04.t vendor/pjdfstest/dist/tests/mknod/05.t vendor/pjdfstest/dist/tests/mknod/06.t vendor/pjdfstest/dist/tests/mknod/07.t vendor/pjdfstest/dist/tests/mknod/08.t vendor/pjdfstest/dist/tests/mknod/09.t vendor/pjdfstest/dist/tests/mknod/10.t vendor/pjdfstest/dist/tests/mknod/11.t vendor/pjdfstest/dist/tests/open/00.t vendor/pjdfstest/dist/tests/open/01.t vendor/pjdfstest/dist/tests/open/02.t vendor/pjdfstest/dist/tests/open/03.t vendor/pjdfstest/dist/tests/open/04.t vendor/pjdfstest/dist/tests/open/05.t vendor/pjdfstest/dist/tests/open/06.t vendor/pjdfstest/dist/tests/open/07.t vendor/pjdfstest/dist/tests/open/08.t vendor/pjdfstest/dist/tests/open/09.t vendor/pjdfstest/dist/tests/open/10.t vendor/pjdfstest/dist/tests/open/11.t vendor/pjdfstest/dist/tests/open/12.t vendor/pjdfstest/dist/tests/open/13.t vendor/pjdfstest/dist/tests/open/14.t vendor/pjdfstest/dist/tests/open/15.t vendor/pjdfstest/dist/tests/open/16.t vendor/pjdfstest/dist/tests/open/17.t vendor/pjdfstest/dist/tests/open/18.t vendor/pjdfstest/dist/tests/open/19.t vendor/pjdfstest/dist/tests/open/20.t vendor/pjdfstest/dist/tests/open/21.t vendor/pjdfstest/dist/tests/open/22.t vendor/pjdfstest/dist/tests/open/23.t vendor/pjdfstest/dist/tests/open/24.t vendor/pjdfstest/dist/tests/rename/00.t vendor/pjdfstest/dist/tests/rename/01.t vendor/pjdfstest/dist/tests/rename/02.t vendor/pjdfstest/dist/tests/rename/03.t vendor/pjdfstest/dist/tests/rename/04.t vendor/pjdfstest/dist/tests/rename/05.t vendor/pjdfstest/dist/tests/rename/06.t vendor/pjdfstest/dist/tests/rename/07.t vendor/pjdfstest/dist/tests/rename/08.t vendor/pjdfstest/dist/tests/rename/09.t vendor/pjdfstest/dist/tests/rename/10.t vendor/pjdfstest/dist/tests/rename/11.t vendor/pjdfstest/dist/tests/rename/12.t vendor/pjdfstest/dist/tests/rename/13.t vendor/pjdfstest/dist/tests/rename/14.t vendor/pjdfstest/dist/tests/rename/15.t vendor/pjdfstest/dist/tests/rename/16.t vendor/pjdfstest/dist/tests/rename/17.t vendor/pjdfstest/dist/tests/rename/18.t vendor/pjdfstest/dist/tests/rename/19.t vendor/pjdfstest/dist/tests/rename/20.t vendor/pjdfstest/dist/tests/rename/21.t vendor/pjdfstest/dist/tests/rmdir/00.t vendor/pjdfstest/dist/tests/rmdir/01.t vendor/pjdfstest/dist/tests/rmdir/02.t vendor/pjdfstest/dist/tests/rmdir/03.t vendor/pjdfstest/dist/tests/rmdir/04.t vendor/pjdfstest/dist/tests/rmdir/05.t vendor/pjdfstest/dist/tests/rmdir/06.t vendor/pjdfstest/dist/tests/rmdir/07.t vendor/pjdfstest/dist/tests/rmdir/08.t vendor/pjdfstest/dist/tests/rmdir/09.t vendor/pjdfstest/dist/tests/rmdir/10.t vendor/pjdfstest/dist/tests/rmdir/11.t vendor/pjdfstest/dist/tests/rmdir/12.t vendor/pjdfstest/dist/tests/rmdir/13.t vendor/pjdfstest/dist/tests/rmdir/14.t vendor/pjdfstest/dist/tests/rmdir/15.t vendor/pjdfstest/dist/tests/symlink/00.t vendor/pjdfstest/dist/tests/symlink/01.t vendor/pjdfstest/dist/tests/symlink/02.t vendor/pjdfstest/dist/tests/symlink/03.t vendor/pjdfstest/dist/tests/symlink/04.t vendor/pjdfstest/dist/tests/symlink/05.t vendor/pjdfstest/dist/tests/symlink/06.t vendor/pjdfstest/dist/tests/symlink/07.t vendor/pjdfstest/dist/tests/symlink/08.t vendor/pjdfstest/dist/tests/symlink/09.t vendor/pjdfstest/dist/tests/symlink/10.t vendor/pjdfstest/dist/tests/symlink/11.t vendor/pjdfstest/dist/tests/symlink/12.t vendor/pjdfstest/dist/tests/truncate/00.t vendor/pjdfstest/dist/tests/truncate/01.t vendor/pjdfstest/dist/tests/truncate/02.t vendor/pjdfstest/dist/tests/truncate/03.t vendor/pjdfstest/dist/tests/truncate/04.t vendor/pjdfstest/dist/tests/truncate/05.t vendor/pjdfstest/dist/tests/truncate/06.t vendor/pjdfstest/dist/tests/truncate/07.t vendor/pjdfstest/dist/tests/truncate/08.t vendor/pjdfstest/dist/tests/truncate/09.t vendor/pjdfstest/dist/tests/truncate/10.t vendor/pjdfstest/dist/tests/truncate/11.t vendor/pjdfstest/dist/tests/truncate/12.t vendor/pjdfstest/dist/tests/truncate/13.t vendor/pjdfstest/dist/tests/truncate/14.t vendor/pjdfstest/dist/tests/unlink/00.t vendor/pjdfstest/dist/tests/unlink/01.t vendor/pjdfstest/dist/tests/unlink/02.t vendor/pjdfstest/dist/tests/unlink/03.t vendor/pjdfstest/dist/tests/unlink/04.t vendor/pjdfstest/dist/tests/unlink/05.t vendor/pjdfstest/dist/tests/unlink/06.t vendor/pjdfstest/dist/tests/unlink/07.t vendor/pjdfstest/dist/tests/unlink/08.t vendor/pjdfstest/dist/tests/unlink/09.t vendor/pjdfstest/dist/tests/unlink/10.t vendor/pjdfstest/dist/tests/unlink/11.t vendor/pjdfstest/dist/tests/unlink/12.t vendor/pjdfstest/dist/tests/unlink/13.t Added: vendor/pjdfstest/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/.gitignore Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,19 @@ +autom4te.cache +aclocal.m4 +compile +configure +config.h* +config.guess +config.log +config.status +config.sub +depcomp +install-sh +missing +pjdfstest +stamp-h1 +INSTALL +Makefile +Makefile.in +.deps +*.o Added: vendor/pjdfstest/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/.travis.yml Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,19 @@ +language: c +sudo: required + +matrix: + include: + - os: linux + compiler: clang + dist: xenial + - os: linux + compiler: gcc + dist: xenial + - os: osx + compiler: clang + - os: osx + compiler: gcc + +script: + - ./travis/build.sh + - ./travis/test.sh Added: vendor/pjdfstest/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/AUTHORS Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,3 @@ +* Alan Somers - contributor/co-maintainer +* Ngie Cooper - contributor/co-maintainer +* Pawel Jakub Dawidek - pjdfstest author/maintainer Added: vendor/pjdfstest/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/COPYING Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,27 @@ +$FreeBSD: head/tools/regression/pjdfstest/LICENSE 211354 2010-08-15 21:29:03Z pjd $ + +License for all regression tests available with pjdfstest: + +Copyright (c) 2006-2012 Pawel Jakub Dawidek +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Added: vendor/pjdfstest/dist/ChangeLog ============================================================================== Added: vendor/pjdfstest/dist/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/Makefile.am Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,5 @@ +AM_CFLAGS= -Wall -Werror + +bin_PROGRAMS= pjdfstest + +pjdfstest_SOURCES= pjdfstest.c Added: vendor/pjdfstest/dist/NEWS ============================================================================== Modified: vendor/pjdfstest/dist/README ============================================================================== --- vendor/pjdfstest/dist/README Wed Jun 28 08:29:20 2017 (r320446) +++ vendor/pjdfstest/dist/README Wed Jun 28 08:48:09 2017 (r320447) @@ -1,22 +1,57 @@ $FreeBSD: head/tools/regression/pjdfstest/README 211354 2010-08-15 21:29:03Z pjd $ -Few notes on how to use pjdfstest in short steps: +============ +Introduction +============ - # cd pjdfstest - # vi tests/conf - Change 'fs' to file system type you want to test (UFS or ZFS). - # vi Makefile - You need to manually tweak few things by editing CFLAGS lines - at the top of the file. - # make - It will compile pjdfstest utility which is used by regression tests. - # cd /path/to/file/system/you/want/to/test/ - # prove -r /path/to/pjdfstest/tests +pjdfstest is a test suite that helps exercise POSIX system calls. -That's all. Enjoy. +pjdfstest supports the following operating systems/filesystems: -Currently supported operating systems: FreeBSD, Solaris. -Currently supported file system types: UFS, ZFS. +- Supported Operating Systems: FreeBSD, Linux, Solaris +- Supported Filesystems: ext4, UFS, ZFS --- -Pawel Jakub Dawidek +================== +Building pjdfstest +================== + +------------- +Prerequisites +------------- + +- autoconf 2.69 or newer +- automake 1.15 or newer +- cc (clang or gcc) +- make +- appropriate system headers (please install your distribution appropriate + header package) + +--------- +Procedure +--------- + + $ autoreconf -ifs + $ ./configure + $ make pjdfstest + +================= +Running pjdfstest +================= + +------------- +Prerequisites +------------- +- You must be root when running these testcases. + +---------------------- +Software Prerequisites +---------------------- +- perl +- TAP-Harness (perl package) + +--------- +Procedure +--------- + + # cd /path/to/filesystem/under/test + # prove -rv /path/to/pjdfstest/tests Added: vendor/pjdfstest/dist/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/configure.ac Wed Jun 28 08:48:09 2017 (r320447) @@ -0,0 +1,107 @@ +AC_PREREQ(2.61) +AC_INIT([pjdfstest],[0.1],) +AC_CONFIG_AUX_DIR([.]) +AM_INIT_AUTOMAKE +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([ \ + Makefile \ +]) + +AC_CANONICAL_HOST + +AC_PROG_CC([cc]) + +# For _GNU_SOURCE on Linux, etc. +AC_USE_SYSTEM_EXTENSIONS + +AC_CHECK_HEADERS([ \ + sys/mkdev.h \ +]) + +#HAS_FREEBSD_ACL + +AC_CHECK_FUNC([bindat], + [AC_DEFINE([HAVE_BINDAT], [1], [Define if bindat exists])]) +AC_CHECK_FUNC([chflags], + [AC_DEFINE([HAVE_CHFLAGS], [1], [Define if chflags exists])]) +AC_CHECK_FUNC([chflagsat], + [AC_DEFINE([HAVE_CHFLAGSAT], [1], [Define if chflagsat exists])]) +AC_CHECK_FUNC([connectat], + [AC_DEFINE([HAVE_CONNECTAT], [1], [Define if connectat exists])]) +AC_CHECK_FUNC([faccessat], + [AC_DEFINE([HAVE_FACCESSAT], [1], [Define if faccessat exists])]) +AC_CHECK_FUNC([fchflags], + [AC_DEFINE([HAVE_FCHFLAGS], [1], [Define if fchflags exists])]) +AC_CHECK_FUNC([fchmodat], + [AC_DEFINE([HAVE_FCHMODAT], [1], [Define if fchmodat exists])]) +AC_CHECK_FUNC([fchownat], + [AC_DEFINE([HAVE_FCHOWNAT], [1], [Define if fchownat exists])]) +AC_CHECK_FUNC([fstatat], + [AC_DEFINE([HAVE_FSTATAT], [1], [Define if fstatat exists])]) +AC_CHECK_FUNC([lchflags], + [AC_DEFINE([HAVE_LCHFLAGS], [1], [Define if lchflags exists])]) +AC_CHECK_FUNC([lchmod], + [AC_DEFINE([HAVE_LCHMOD], [1], [Define if lchmod exists])]) +AC_CHECK_FUNC([linkat], + [AC_DEFINE([HAVE_LINKAT], [1], [Define if linkat exists])]) +AC_CHECK_FUNC([lpathconf], + [AC_DEFINE([HAVE_LPATHCONF], [1], [Define if lpathconf exists])]) +AC_CHECK_FUNC([mkdirat], + [AC_DEFINE([HAVE_MKDIRAT], [1], [Define if mkdirat exists])]) +AC_CHECK_FUNC([mkfifoat], + [AC_DEFINE([HAVE_MKFIFOAT], [1], [Define if mkfifoat exists])]) +AC_CHECK_FUNC([mknodat], + [AC_DEFINE([HAVE_MKNODAT], [1], [Define if mknodat exists])]) +AC_CHECK_FUNC([openat], + [AC_DEFINE([HAVE_OPENAT], [1], [Define if openat exists])]) +AC_CHECK_FUNC([posix_fallocate], + [AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define if posix_fallocate exists])]) +AC_CHECK_FUNC([readlinkat], + [AC_DEFINE([HAVE_READLINKAT], [1], [Define if readlinkat exists])]) +AC_CHECK_FUNC([renameat], + [AC_DEFINE([HAVE_RENAMEAT], [1], [Define if renameat exists])]) +AC_CHECK_FUNC([symlinkat], + [AC_DEFINE([HAVE_SYMLINKAT], [1], [Define if symlinkat exists])]) +AC_CHECK_FUNC([utimensat], + [AC_DEFINE([HAVE_UTIMENSAT], [1], [Define if utimensat exists])]) + +# ACL test battery. +AC_CHECK_HEADER([sys/acl.h], [has_sys_acl_h=yes], [has_sys_acl_h=no]) +has_acl_funcs=no +if test x$has_sys_acl_h = xyes; then + AC_DEFINE([HAVE_SYS_ACL_H], [1], + [Define to 1 if sys/acl.h is available]) + AC_CHECK_FUNCS([acl_create_entry_np acl_from_text acl_get_entry acl_get_file acl_set_file], + [has_acl_funcs=yes],[]) +fi +if test x$has_acl_funcs = xyes; then + # Check for NFSv4 ACL support. + AC_CHECK_DECL([ACL_TYPE_NFS4], + [has_nfsv4_acl_support=yes], [has_nfsv4_acl_support=no],[[#include ]]) + if test x$has_nfsv4_acl_support = xyes; then + AC_DEFINE([HAS_NFSV4_ACL_SUPPORT], [1], + [Define to 1 if NFSv4 ACL support is available]) + fi +fi + +AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_birthtim, struct stat.st_birthtime, struct stat.st_birthtimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_ctim, struct stat.st_ctimespec], [], [], [[ +#include +#include +]]) + +AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimespec], [], [], [[ +#include +#include +]]) + +AC_OUTPUT Modified: vendor/pjdfstest/dist/pjdfstest.c ============================================================================== --- vendor/pjdfstest/dist/pjdfstest.c Wed Jun 28 08:29:20 2017 (r320446) +++ vendor/pjdfstest/dist/pjdfstest.c Wed Jun 28 08:48:09 2017 (r320447) @@ -26,14 +26,19 @@ * $FreeBSD$ */ +/* Needs to be first to twiddle appropriate system configuration/HAVE_* flags */ +#include "config.h" + #include -#include +#ifdef HAVE_SYS_ACL_H +#include +#endif +#ifdef HAVE_SYS_MKDEV_H +#include +#endif #include #include #include -#ifndef makedev -#include -#endif #include #include @@ -45,18 +50,15 @@ #include #include -#ifndef HAS_TRUNCATE64 -#define truncate64 truncate -#define ftruncate64 ftruncate +#ifdef __sun__ +#define _USE_STAT64 #endif -#ifndef HAS_STAT64 -#define stat64 stat -#define fstat64 fstat -#define lstat64 lstat + +#ifdef _USE_STAT64 +typedef struct stat64 stat_t; +#else +typedef struct stat stat_t; #endif -#ifdef HAS_FREEBSD_ACL -#include -#endif #ifndef ALLPERMS #define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) @@ -64,69 +66,91 @@ enum action { ACTION_OPEN, +#ifdef HAVE_OPENAT ACTION_OPENAT, +#endif ACTION_CREATE, ACTION_UNLINK, +#ifdef HAVE_UNLINKAT ACTION_UNLINKAT, +#endif ACTION_MKDIR, +#ifdef HAVE_MKDIRAT ACTION_MKDIRAT, +#endif ACTION_RMDIR, ACTION_LINK, +#ifdef HAVE_LINKAT ACTION_LINKAT, +#endif ACTION_SYMLINK, +#ifdef HAVE_SYMLINKAT ACTION_SYMLINKAT, +#endif ACTION_RENAME, +#ifdef HAVE_RENAMEAT ACTION_RENAMEAT, +#endif ACTION_MKFIFO, +#ifdef HAVE_MKFIFOAT ACTION_MKFIFOAT, +#endif ACTION_MKNOD, ACTION_MKNODAT, ACTION_BIND, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT ACTION_BINDAT, #endif ACTION_CONNECT, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT ACTION_CONNECTAT, #endif ACTION_CHMOD, ACTION_FCHMOD, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD ACTION_LCHMOD, #endif ACTION_FCHMODAT, ACTION_CHOWN, ACTION_FCHOWN, ACTION_LCHOWN, +#ifdef HAVE_FCHOWNAT ACTION_FCHOWNAT, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS ACTION_CHFLAGS, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS ACTION_FCHFLAGS, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT ACTION_CHFLAGSAT, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS ACTION_LCHFLAGS, #endif ACTION_TRUNCATE, ACTION_FTRUNCATE, +#ifdef HAVE_POSIX_FALLOCATE + ACTION_POSIX_FALLOCATE, +#endif ACTION_STAT, ACTION_FSTAT, ACTION_LSTAT, ACTION_FSTATAT, ACTION_PATHCONF, ACTION_FPATHCONF, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF ACTION_LPATHCONF, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT ACTION_PREPENDACL, ACTION_READACL, #endif ACTION_WRITE, +#ifdef HAVE_UTIMENSAT + ACTION_UTIMENSAT, +#endif }; #define TYPE_NONE 0x0000 @@ -147,69 +171,104 @@ struct syscall_desc { static struct syscall_desc syscalls[] = { { "open", ACTION_OPEN, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#ifdef HAVE_OPENAT { "openat", ACTION_OPENAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, +#endif { "create", ACTION_CREATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "unlink", ACTION_UNLINK, { TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UNLINKAT { "unlinkat", ACTION_UNLINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "mkdir", ACTION_MKDIR, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKDIRAT { "mkdirat", ACTION_MKDIRAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "rmdir", ACTION_RMDIR, { TYPE_STRING, TYPE_NONE } }, { "link", ACTION_LINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_LINKAT { "linkat", ACTION_LINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_SYMLINKAT { "symlinkat", ACTION_SYMLINKAT, { TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_RENAMEAT { "renameat", ACTION_RENAMEAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif { "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_MKFIFOAT { "mkfifoat", ACTION_MKFIFOAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif { "mknod", ACTION_MKNOD, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#ifdef HAVE_MKNODAT { "mknodat", ACTION_MKNODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, +#endif { "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT { "bindat", ACTION_BINDAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT { "connectat", ACTION_CONNECTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif { "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "fchmod", ACTION_FCHMOD, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD { "lchmod", ACTION_LCHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, #endif +#ifdef HAVE_FCHMODAT { "fchmodat", ACTION_FCHMODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, +#endif { "chown", ACTION_CHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "fchown", ACTION_FCHOWN, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "lchown", ACTION_LCHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_FCHOWNAT { "fchownat", ACTION_FCHOWNAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS { "chflags", ACTION_CHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS { "fchflags", ACTION_FCHFLAGS, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT { "chflagsat", ACTION_CHFLAGSAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_LCHFLAGS +#ifdef HAVE_LCHFLAGS { "lchflags", ACTION_LCHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif { "truncate", ACTION_TRUNCATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, { "ftruncate", ACTION_FTRUNCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAVE_POSIX_FALLOCATE + { "posix_fallocate", ACTION_POSIX_FALLOCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, +#endif { "stat", ACTION_STAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fstat", ACTION_FSTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, { "lstat", ACTION_LSTAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_FSTATAT { "fstatat", ACTION_FSTATAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif { "pathconf", ACTION_PATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "fpathconf", ACTION_FPATHCONF, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, -#ifdef HAS_LPATHCONF +#ifdef HAVE_LPATHCONF { "lpathconf", ACTION_LPATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, #endif -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT { "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, { "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } }, #endif { "write", ACTION_WRITE, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#ifdef HAVE_UTIMENSAT + { "utimensat", ACTION_UTIMENSAT, { + TYPE_DESCRIPTOR, /* Directory */ + TYPE_STRING, /* Relative path */ + TYPE_NUMBER, /* atime seconds */ + TYPE_STRING, /* atime nanoseconds */ + TYPE_NUMBER, /* mtime seconds */ + TYPE_STRING, /* mtime nanoseconds */ + TYPE_STRING, /* flags */}}, +#endif { NULL, -1, { TYPE_NONE } } }; @@ -219,122 +278,136 @@ struct flag { }; static struct flag open_flags[] = { -#ifdef O_RDONLY +#ifdef O_RDONLY { O_RDONLY, "O_RDONLY" }, #endif -#ifdef O_WRONLY +#ifdef O_WRONLY { O_WRONLY, "O_WRONLY" }, #endif -#ifdef O_RDWR +#ifdef O_RDWR { O_RDWR, "O_RDWR" }, #endif -#ifdef O_NONBLOCK +#ifdef O_NONBLOCK { O_NONBLOCK, "O_NONBLOCK" }, #endif -#ifdef O_APPEND +#ifdef O_APPEND { O_APPEND, "O_APPEND" }, #endif -#ifdef O_CREAT +#ifdef O_CREAT { O_CREAT, "O_CREAT" }, #endif -#ifdef O_TRUNC +#ifdef O_TRUNC { O_TRUNC, "O_TRUNC" }, #endif -#ifdef O_EXCL +#ifdef O_EXCL { O_EXCL, "O_EXCL" }, #endif -#ifdef O_SHLOCK +#ifdef O_SHLOCK { O_SHLOCK, "O_SHLOCK" }, #endif -#ifdef O_EXLOCK +#ifdef O_EXLOCK { O_EXLOCK, "O_EXLOCK" }, #endif -#ifdef O_DIRECT +#ifdef O_DIRECT { O_DIRECT, "O_DIRECT" }, #endif -#ifdef O_FSYNC +#ifdef O_FSYNC { O_FSYNC, "O_FSYNC" }, #endif -#ifdef O_SYNC +#ifdef O_SYNC { O_SYNC, "O_SYNC" }, #endif -#ifdef O_NOFOLLOW +#ifdef O_NOFOLLOW { O_NOFOLLOW, "O_NOFOLLOW" }, #endif -#ifdef O_NOCTTY +#ifdef O_NOCTTY { O_NOCTTY, "O_NOCTTY" }, #endif -#ifdef O_DIRECTORY +#ifdef O_DIRECTORY { O_DIRECTORY, "O_DIRECTORY" }, #endif { 0, NULL } }; -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static struct flag chflags_flags[] = { -#ifdef UF_NODUMP +#ifdef UF_NODUMP { UF_NODUMP, "UF_NODUMP" }, #endif -#ifdef UF_IMMUTABLE +#ifdef UF_IMMUTABLE { UF_IMMUTABLE, "UF_IMMUTABLE" }, #endif -#ifdef UF_APPEND +#ifdef UF_APPEND { UF_APPEND, "UF_APPEND" }, #endif -#ifdef UF_NOUNLINK +#ifdef UF_NOUNLINK { UF_NOUNLINK, "UF_NOUNLINK" }, #endif -#ifdef UF_OPAQUE +#ifdef UF_OPAQUE { UF_OPAQUE, "UF_OPAQUE" }, #endif -#ifdef SF_ARCHIVED +#ifdef SF_ARCHIVED { SF_ARCHIVED, "SF_ARCHIVED" }, #endif -#ifdef SF_IMMUTABLE +#ifdef SF_IMMUTABLE { SF_IMMUTABLE, "SF_IMMUTABLE" }, #endif -#ifdef SF_APPEND +#ifdef SF_APPEND { SF_APPEND, "SF_APPEND" }, #endif -#ifdef SF_NOUNLINK +#ifdef SF_NOUNLINK { SF_NOUNLINK, "SF_NOUNLINK" }, #endif -#ifdef SF_SNAPSHOT +#ifdef SF_SNAPSHOT { SF_SNAPSHOT, "SF_SNAPSHOT" }, #endif { 0, NULL } }; #endif +#ifdef HAVE_UNLINKAT static struct flag unlinkat_flags[] = { { AT_REMOVEDIR, "AT_REMOVEDIR" }, { 0, NULL } }; +#endif +#ifdef HAVE_LINKAT static struct flag linkat_flags[] = { +#ifdef AT_SYMLINK_FOLLOW { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" }, +#endif { 0, NULL } }; +#endif +#ifdef HAVE_CHFLAGSAT static struct flag chflagsat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHMODAT static struct flag fchmodat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FCHOWNAT static struct flag fchownat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif +#ifdef HAVE_FSTATAT static struct flag fstatat_flags[] = { { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, { 0, NULL } }; +#endif struct name { int n_name; @@ -342,16 +415,16 @@ struct name { }; static struct name pathconf_names[] = { -#ifdef _PC_LINK_MAX +#ifdef _PC_LINK_MAX { _PC_LINK_MAX, "_PC_LINK_MAX" }, #endif -#ifdef _PC_NAME_MAX +#ifdef _PC_NAME_MAX { _PC_NAME_MAX, "_PC_NAME_MAX" }, #endif -#ifdef _PC_PATH_MAX +#ifdef _PC_PATH_MAX { _PC_PATH_MAX, "_PC_PATH_MAX" }, #endif -#ifdef _PC_SYMLINK_MAX +#ifdef _PC_SYMLINK_MAX { _PC_SYMLINK_MAX, "_PC_SYMLINK_MAX" }, #endif { 0, NULL } @@ -394,7 +467,7 @@ str2flags(struct flag *tflags, char *sflags) return (flags); } -#ifdef HAS_CHFLAGS +#ifdef HAVE_CHFLAGS static char * flags2str(struct flag *tflags, long long flags) { @@ -440,7 +513,7 @@ find_syscall(const char *name) } static void -show_stat(struct stat64 *sp, const char *what) +show_stat(stat_t *sp, const char *what) { if (strcmp(what, "mode") == 0) @@ -459,11 +532,51 @@ show_stat(struct stat64 *sp, const char *what) printf("%lld", (long long)sp->st_blocks); else if (strcmp(what, "atime") == 0) printf("%lld", (long long)sp->st_atime); - else if (strcmp(what, "mtime") == 0) - printf("%lld", (long long)sp->st_mtime); +#if defined(HAVE_STRUCT_STAT_ST_ATIM) || \ + defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) + else if (strcmp(what, "atime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_ATIMESPEC + printf("%lld", (long long)sp->st_atimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_atim.tv_nsec); +#endif +#endif /* st_atim* */ else if (strcmp(what, "ctime") == 0) printf("%lld", (long long)sp->st_ctime); -#ifdef HAS_CHFLAGS +#if defined(HAVE_STRUCT_STAT_ST_CTIM) || \ + defined(HAVE_STRUCT_STAT_ST_CTIMESPEC) + else if (strcmp(what, "ctime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_CTIMESPEC + printf("%lld", (long long)sp->st_ctimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_ctim.tv_nsec); +#endif +#endif /* st_ctim* */ + else if (strcmp(what, "mtime") == 0) + printf("%lld", (long long)sp->st_mtime); + else if (strcmp(what, "mtime_ns") == 0) +#if defined(HAVE_STRUCT_STAT_ST_MTIM) || \ + defined(HAVE_STRUCT_STAT_ST_MTIMESPEC) +#ifdef HAVE_STRUCT_STAT_ST_MTIMESPEC + printf("%lld", (long long)sp->st_mtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_mtim.tv_nsec); +#endif +#endif /* st_mtim* */ +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + else if (strcmp(what, "birthtime") == 0) + printf("%lld", (long long)sp->st_birthtime); +#endif /* st_birthtime */ +#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIM) || \ + defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC) + else if (strcmp(what, "birthtime_ns") == 0) +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC + printf("%lld", (long long)sp->st_birthtimespec.tv_nsec); +#else + printf("%lld", (long long)sp->st_birthtim.tv_nsec); +#endif +#endif /* st_birthtim{,espec} */ +#ifdef HAVE_CHFLAGS else if (strcmp(what, "flags") == 0) printf("%s", flags2str(chflags_flags, (long long)sp->st_flags)); #endif @@ -504,7 +617,7 @@ show_stat(struct stat64 *sp, const char *what) } static void -show_stats(struct stat64 *sp, char *what) +show_stats(stat_t *sp, char *what) { const char *s = ""; char *w; @@ -547,7 +660,11 @@ descriptor_get(int pos) static unsigned int call_syscall(struct syscall_desc *scall, char *argv[]) { - struct stat64 sb; + stat_t sb; +#ifdef HAVE_UTIMENSAT + struct timespec times[2]; + int flag; +#endif long long flags; unsigned int i; char *endp; @@ -556,7 +673,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) char *str; long long num; } args[MAX_ARGS]; -#ifdef HAS_FREEBSD_ACL +#ifdef HAS_NFSV4_ACL_SUPPORT int entry_id = ACL_FIRST_ENTRY; acl_t acl, newacl; acl_entry_t entry, newentry; @@ -645,6 +762,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#ifdef HAVE_OPENAT case ACTION_OPENAT: flags = str2flags(open_flags, STR(2)); if (flags & O_CREAT) { @@ -664,6 +782,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) if (rval >= 0) descriptor_add(rval); break; +#endif case ACTION_CREATE: rval = open(STR(0), O_CREAT | O_EXCL, (mode_t)NUM(1)); if (rval >= 0) @@ -672,46 +791,60 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_UNLINK: rval = unlink(STR(0)); break; +#ifdef HAVE_UNLINKAT case ACTION_UNLINKAT: rval = unlinkat(NUM(0), STR(1), (int)str2flags(unlinkat_flags, STR(2))); break; +#endif case ACTION_MKDIR: rval = mkdir(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKDIRAT case ACTION_MKDIRAT: rval = mkdirat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_RMDIR: rval = rmdir(STR(0)); break; case ACTION_LINK: rval = link(STR(0), STR(1)); break; +#ifdef HAVE_LINKAT case ACTION_LINKAT: rval = linkat(NUM(0), STR(1), NUM(2), STR(3), (int)str2flags(linkat_flags, STR(4))); break; +#endif case ACTION_SYMLINK: rval = symlink(STR(0), STR(1)); break; +#ifdef HAVE_SYMLINKAT case ACTION_SYMLINKAT: rval = symlinkat(STR(0), NUM(1), STR(2)); break; +#endif case ACTION_RENAME: rval = rename(STR(0), STR(1)); break; +#ifdef HAVE_RENAMEAT case ACTION_RENAMEAT: rval = renameat(NUM(0), STR(1), NUM(2), STR(3)); break; +#endif case ACTION_MKFIFO: rval = mkfifo(STR(0), (mode_t)NUM(1)); break; +#ifdef HAVE_MKFIFOAT case ACTION_MKFIFOAT: rval = mkfifoat(NUM(0), STR(1), (mode_t)NUM(2)); break; +#endif case ACTION_MKNOD: +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: +#endif { mode_t ntype; dev_t dev; @@ -721,9 +854,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: fa = 0; break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: fa = 1; break; +#endif default: abort(); } @@ -747,9 +882,11 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_MKNOD: rval = mknod(STR(0), ntype | NUM(2), dev); break; +#ifdef HAVE_MKNODAT case ACTION_MKNODAT: rval = mknodat(NUM(0), STR(1), ntype | NUM(3), dev); break; +#endif default: abort(); } @@ -768,7 +905,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = bind(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_BINDAT +#ifdef HAVE_BINDAT case ACTION_BINDAT: { struct sockaddr_un sunx; @@ -797,7 +934,7 @@ call_syscall(struct syscall_desc *scall, char *argv[]) rval = connect(rval, (struct sockaddr *)&sunx, sizeof(sunx)); break; } -#ifdef HAS_CONNECTAT +#ifdef HAVE_CONNECTAT case ACTION_CONNECTAT: { struct sockaddr_un sunx; @@ -819,15 +956,17 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_FCHMOD: rval = fchmod(NUM(0), (mode_t)NUM(1)); break; -#ifdef HAS_LCHMOD +#ifdef HAVE_LCHMOD case ACTION_LCHMOD: rval = lchmod(STR(0), (mode_t)NUM(1)); break; #endif +#ifdef HAVE_FCHMODAT case ACTION_FCHMODAT: rval = fchmodat(NUM(0), STR(1), (mode_t)NUM(2), str2flags(fchmodat_flags, STR(3))); break; +#endif case ACTION_CHOWN: rval = chown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; @@ -837,62 +976,94 @@ call_syscall(struct syscall_desc *scall, char *argv[]) case ACTION_LCHOWN: rval = lchown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); break; +#ifdef HAVE_FCHOWNAT case ACTION_FCHOWNAT: rval = fchownat(NUM(0), STR(1), (uid_t)NUM(2), (gid_t)NUM(3), (int)str2flags(fchownat_flags, STR(4))); break; -#ifdef HAS_CHFLAGS +#endif +#ifdef HAVE_CHFLAGS case ACTION_CHFLAGS: rval = chflags(STR(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_FCHFLAGS +#ifdef HAVE_FCHFLAGS case ACTION_FCHFLAGS: rval = fchflags(NUM(0), (unsigned long)str2flags(chflags_flags, STR(1))); break; #endif -#ifdef HAS_CHFLAGSAT +#ifdef HAVE_CHFLAGSAT case ACTION_CHFLAGSAT: rval = chflagsat(NUM(0), STR(1), (unsigned long)str2flags(chflags_flags, STR(2)), (int)str2flags(chflagsat_flags, STR(3))); break; #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 28 09:23:48 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9077D9D267; Wed, 28 Jun 2017 09:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 597E771B2D; Wed, 28 Jun 2017 09:23:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5S9NlS7021764; Wed, 28 Jun 2017 09:23:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5S9Nls7021763; Wed, 28 Jun 2017 09:23:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706280923.v5S9Nls7021763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 28 Jun 2017 09:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320449 - vendor/pjdfstest/0.1 X-SVN-Group: vendor X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: vendor/pjdfstest/0.1 X-SVN-Commit-Revision: 320449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 09:23:48 -0000 Author: ngie Date: Wed Jun 28 09:23:47 2017 New Revision: 320449 URL: https://svnweb.freebsd.org/changeset/base/320449 Log: Tag pjdfstest 0.1 Added: vendor/pjdfstest/0.1/ - copied from r320448, vendor/pjdfstest/dist/ From owner-svn-src-vendor@freebsd.org Thu Jun 29 18:42:16 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7285CDA2E65; Thu, 29 Jun 2017 18:42:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3B96E55E; Thu, 29 Jun 2017 18:42:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TIgFg0046845; Thu, 29 Jun 2017 18:42:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TIgDa6046829; Thu, 29 Jun 2017 18:42:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201706291842.v5TIgDa6046829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 29 Jun 2017 18:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320476 - in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/disassembler source/components/dispatcher source/components/executer source/com... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/disassembler source/components/dispatcher source/components/executer source/components/hardware source/c... X-SVN-Commit-Revision: 320476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:42:16 -0000 Author: jkim Date: Thu Jun 29 18:42:13 2017 New Revision: 320476 URL: https://svnweb.freebsd.org/changeset/base/320476 Log: Import ACPICA 20170629. Added: vendor-sys/acpica/dist/source/compiler/aslparseop.c (contents, props changed) Deleted: vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/changes.txt Thu Jun 29 18:42:13 2017 (r320476) @@ -1,4 +1,204 @@ ---------------------------------------- +29 June 2017. Summary of changes for version 20170629: + + +1) ACPICA kernel-resident subsystem: + +Tables: Implemented a deferred ACPI table verification. This is useful +for operating systems where the tables cannot be verified in the early +initialization stage due to early memory mapping limitations on some +architectures. Lv Zheng. + +Tables: Removed the signature validation for dynamically loaded tables. +Provides compatibility with other ACPI implementations. Previously, only +SSDT tables were allowed, as per the ACPI specification. Now, any table +signature can be used via the Load() operator. Lv Zheng. + +Tables: Fixed several mutex issues that could cause errors during table +acquisition. Lv Zheng. + +Tables: Fixed a problem where an ACPI warning could be generated if a +null pointer was passed to the AcpiPutTable interface. Lv Zheng. + +Tables: Added a mechanism to handle imbalances for the AcpiGetTable and +AcpiPutTable interfaces. This applies to the "late stage" table loading +when the use of AcpiPutTable is no longer required (since the system +memory manager is fully running and available). Lv Zheng. + +Fixed/Reverted a regression during processing of resource descriptors +that contain only a single EndTag. Fixes an AE_AML_NO_RESOURCE_END_TAG +exception in this case. + +Headers: IORT/SMMU support: Updated the SMMU models for Revision C of the +I/O Remapping specification. Robin Murphy + +Interpreter: Fixed a possible fault if an Alias operator with an invalid +or duplicate target is encountered during Alias creation in +AcpiExCreateAlias. Alex James + +Added an option to use designated initializers for function pointers. +Kees Cook + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Allow compilation of External declarations with target pathnames +that refer to existing named objects within the table. Erik Schmauss. + +iASL: Fixed a regression when compiling FieldUnits. Fixes an error if a +FieldUnit name also is declared via External in the same table. Erik +Schmauss. + +iASL: Allow existing scope names within pathnames used in External +statements. For example: + External (ABCD.EFGH) // ABCD exists, but EFGH is truly external + Device (ABCD) + +iASL: IORT ACPI table: Implemented changes required to decode the new +Proximity Domain for the SMMUv3 IORT. Disassembler and Data Table +compiler. Ganapatrao Kulkarni + +Disassembler: Don't abort disassembly on errors from External() +statements. Erik Schmauss. + +Disassembler: fixed a possible fault when one of the Create*Field +operators references a Resource Template. ACPICA Bugzilla 1396. + +iASL: In the source code, resolved some naming inconsistences across the +parsing support. Fixes confusion between "Parse Op" and "Parse Node". +Adds a new file, aslparseop.c + +---------------------------------------- +31 May 2017. Summary of changes for version 20170531: + + +0) ACPI 6.2 support: + +The ACPI specification version 6.2 has been released and is available at +http://uefi.org/specifications + +This version of ACPICA fully supports the ACPI 6.2 specification. Changes +are summarized below. + +New ACPI tables (Table Compiler/Disassembler/Templates): + HMAT (Heterogeneous Memory Attributes Table) + WSMT (Windows SMM Security Mitigation Table) + PPTT (Processor Properties Topology Table) + +New subtables for existing ACPI tables: + HEST (New subtable, Arch-deferred machine check) + SRAT (New subtable, Arch-specific affinity structure) + PCCT (New subtables, Extended PCC subspaces (types 3 and 4)) + +Simple updates for existing ACPI tables: + BGRT (two new flag bits) + HEST (New bit defined for several subtables, GHES_ASSIST) + +New Resource Descriptors and Resource macros (Compiler/Disassembler): + PinConfig() + PinFunction() + PinGroup() + PinGroupConfig() + PinGroupFunction() + New type for hardware error notification (section 18.3.2.9) + +New predefined names/methods (Compiler/Interpreter): + _HMA (Heterogeneous Memory Attributes) + _LSI (Label Storage Information) + _LSR (Label Storage Read) + _LSW (Label Storage Write) + +ASL grammar/macro changes (Compiler): + For() ASL macro, implemented with the AML while operator + Extensions to Concatenate operator + Support for multiple definition blocks in same ASL file + Clarification for Buffer operator + Allow executable AML code underneath all scopes (Devices, etc.) + Clarification/change for the _OSI return value + ASL grammar update for reference operators + Allow a zero-length string for AML filename in DefinitionBlock + +Miscellaneous: + New device object notification value + Remove a notify value (0x0C) for graceful shutdown + New UUIDs for processor/cache properties and + physical package property + New _HID, ACPI0014 (Wireless Power Calibration Device) + + +1) ACPICA kernel-resident subsystem: + +Added support to disable ACPI events on hardware-reduced platforms. +Eliminates error messages of the form "Could not enable fixed event". Lv +Zheng + +Fixed a problem using Device/Thermal objects with the ObjectType and +DerefOf ASL operators. This support had not been fully/properly +implemented. + +Fixed a problem where if a Buffer object containing a resource template +was longer than the actual resource template, an error was generated -- +even though the AML is legal. This case has been seen in the field. + +Fixed a problem with the header definition of the MADT PCAT_COMPAT flag. +The values for DUAL_PIC and MULTIPLE_APIC were reversed. + +Added header file changes for the TPM2 ACPI table. Update to new version +of the TCG specification. Adds a new TPM2 subtable for ARM SMC. + +Exported the external interfaces AcpiAcquireMutex and AcpiReleaseMutex. +These interfaces are intended to be used only in conjunction with the +predefined _DLM method (Device Lock Method). "This object appears in a +device scope when AML access to the device must be synchronized with the +OS environment". + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 143.1K Code, 60.0K Data, 203.1K Total + Debug Version: 204.0K Code, 84.3K Data, 288.3K Total + Previous Release: + Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total + Debug Version: 207.5K Code, 82.7K Data, 290.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem where an External() declaration could not refer to +a Field Unit. Erik Schmauss. + +Disassembler: Improved support for the Switch/Case operators. This +feature will disassemble AML code back to the original Switch operators +when possible, instead of an If..Else sequence. David Box + +iASL and disassembler: Improved the handling of multiple extraneous +parentheses for both ASL input and disassembled ASL output. + +Improved the behavior of the iASL compiler and disassembler to detect +improper use of external declarations + +Disassembler: Now aborts immediately upon detection of an unknown AML +opcode. The AML parser has no real way to recover from this, and can +result in the creation of an ill-formed parse tree that causes errors +later during the disassembly. + +All tools: Fixed a problem where the Unix application OSL did not handle +control-c correctly. For example, a control-c could incorrectly wake the +debugger. + +AcpiExec: Improved the Control-C handling and added a handler for +segmentation faults (SIGSEGV). Supports both Windows and Unix-like +environments. + +Reduced the verbosity of the generic unix makefiles. Previously, each +compilation displayed the full set of compiler options. This has been +eliminated as the options are easily inspected within the makefiles. Each +compilation now results in a single line of output. + +---------------------------------------- 03 March 2017. Summary of changes for version 20170303: Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Jun 29 18:42:13 2017 (r320476) @@ -82,6 +82,7 @@ OBJECTS = \ $(OBJDIR)/asloperands.o\ $(OBJDIR)/aslopt.o\ $(OBJDIR)/asloptions.o\ + $(OBJDIR)/aslparseop.o\ $(OBJDIR)/aslpredef.o\ $(OBJDIR)/aslprepkg.o\ $(OBJDIR)/aslprintf.o\ Modified: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/acfileio.c Thu Jun 29 18:42:13 2017 (r320476) @@ -175,6 +175,36 @@ AcCheckTextModeCorruption ( /******************************************************************************* * + * FUNCTION: AcDeleteTableList + * + * PARAMETERS: ListHead - List to delete + * + * RETURN: Status + * + * DESCRIPTION: Delete a list of tables. This is useful for removing memory + * allocated by AcGetAllTablesFromFile + * + ******************************************************************************/ + +void +AcDeleteTableList ( + ACPI_NEW_TABLE_DESC *ListHead) +{ + ACPI_NEW_TABLE_DESC *Current = ListHead; + ACPI_NEW_TABLE_DESC *Previous = Current; + + + while (Current) + { + Current = Current->Next; + AcpiOsFree (Previous); + Previous = Current; + } +} + + +/******************************************************************************* + * * FUNCTION: AcGetAllTablesFromFile * * PARAMETERS: Filename - Table filename Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Jun 29 18:42:13 2017 (r320476) @@ -408,6 +408,8 @@ Cleanup: ACPI_FREE (Table); } + AcDeleteTableList (ListHead); + if (File) { fclose (File); @@ -748,6 +750,7 @@ AdDoExternalFileList ( continue; } + AcDeleteTableList (ExternalListHead); return (Status); } @@ -761,6 +764,7 @@ AdDoExternalFileList ( { AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", AcpiFormatException (Status)); + AcDeleteTableList (ExternalListHead); return (Status); } @@ -779,6 +783,8 @@ AdDoExternalFileList ( ExternalFileList = ExternalFileList->Next; } + + AcDeleteTableList (ExternalListHead); if (ACPI_FAILURE (GlobalStatus)) { Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/adwalk.c Thu Jun 29 18:42:13 2017 (r320476) @@ -536,11 +536,20 @@ AcpiDmDumpDescending ( case AML_NAME_OP: case AML_METHOD_OP: case AML_DEVICE_OP: + + AcpiOsPrintf ("%4.4s", + ACPI_CAST_PTR (char, &Op->Named.Name)); + break; + case AML_INT_NAMEDFIELD_OP: - AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name)); + AcpiOsPrintf ("%4.4s Length: (bits) %8.8X%8.8X (bytes) %8.8X%8.8X", + ACPI_CAST_PTR (char, &Op->Named.Name), + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer / 8)); break; + default: break; @@ -1070,10 +1079,10 @@ AcpiDmCommonDescendingOp ( { ACPI_STATUS Status; + /* Resource descriptor conversion */ Status = AcpiDmProcessResourceDescriptors (Op, Level, Context); - if (ACPI_FAILURE (Status)) { return (Status); @@ -1082,7 +1091,6 @@ AcpiDmCommonDescendingOp ( /* Switch/Case conversion */ Status = AcpiDmProcessSwitch (Op); - return (AE_OK); } @@ -1113,6 +1121,7 @@ AcpiDmProcessResourceDescriptors ( ACPI_OBJECT_TYPE ObjectType; ACPI_STATUS Status; + WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -1138,7 +1147,6 @@ AcpiDmProcessResourceDescriptors ( * If so, convert the reference into a symbolic reference. */ AcpiDmCheckResourceReference (Op, WalkState); - return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jun 29 18:42:13 2017 (r320476) @@ -474,6 +474,15 @@ AcpiAhMatchPredefinedName ( const AH_PREDEFINED_NAME *Info; + /* Nameseg must start with an underscore */ + + if (*Nameseg != '_') + { + return (NULL); + } + + /* Search for a match in the predefined name table */ + for (Info = AslPredefinedInfo; Info->Name; Info++) { if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jun 29 18:42:13 2017 (r320476) @@ -1838,6 +1838,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] = {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Flags), "Flags (decoded below)", 0}, {ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0}, {ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0}, + {ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0}, {ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0}, @@ -1845,6 +1846,9 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] = {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (PriGsiv), "PRI GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (GerrGsiv), "GERR GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (SyncGsiv), "Sync GSIV", 0}, + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0}, + {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0}, + {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0}, ACPI_DMT_TERMINATOR }; Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jun 29 18:42:13 2017 (r320476) @@ -435,13 +435,13 @@ AnCheckMethodReturnValue ( /* Examine the parent op of this method */ OwningOp = Node->Op; - if (OwningOp->Asl.CompileFlags & NODE_METHOD_NO_RETVAL) + if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL) { /* Method NEVER returns a value */ AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName); } - else if (OwningOp->Asl.CompileFlags & NODE_METHOD_SOME_NO_RETVAL) + else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL) { /* Method SOMETIMES returns a value, SOMETIMES not */ Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jun 29 18:42:13 2017 (r320476) @@ -560,7 +560,7 @@ AnGetBtype ( return (ACPI_UINT32_MAX); } - if (ReferencedNode->Asl.CompileFlags & NODE_METHOD_TYPED) + if (ReferencedNode->Asl.CompileFlags & OP_METHOD_TYPED) { ThisNodeBtype = ReferencedNode->Asl.AcpiBtype; } Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jun 29 18:42:13 2017 (r320476) @@ -291,6 +291,8 @@ CgAmlWriteWalk ( /* 19 */ Op->Asl.LogicalLineNumber, /* 20 */ Op->Asl.EndLogicalLine); + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT); + DbgPrint (ASL_TREE_OUTPUT, "\n"); return (AE_OK); } @@ -438,7 +440,7 @@ CgWriteAmlOpcode ( /* Does this opcode have an associated "PackageLength" field? */ - if (Op->Asl.CompileFlags & NODE_AML_PACKAGE) + if (Op->Asl.CompileFlags & OP_AML_PACKAGE) { if (Op->Asl.AmlPkgLenBytes == 1) { Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jun 29 18:42:13 2017 (r320476) @@ -790,17 +790,6 @@ TrAmlTransformWalkEnd ( /* - * asltree - parse tree support - */ -ACPI_STATUS -TrWalkParseTree ( - ACPI_PARSE_OBJECT *Op, - UINT32 Visitation, - ASL_WALK_CALLBACK DescendingCallback, - ASL_WALK_CALLBACK AscendingCallback, - void *Context); - -/* * aslexternal - External opcode support */ ACPI_STATUS @@ -826,103 +815,111 @@ ExDoExternal ( #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) -void -TrSetParent ( - ACPI_PARSE_OBJECT *Op, - ACPI_PARSE_OBJECT *ParentOp); - +/* + * aslparseop.c - Parse op create/allocate/cache + */ ACPI_PARSE_OBJECT * -TrAllocateNode ( - UINT32 ParseOpcode); - -void -TrPrintNodeCompileFlags ( - UINT32 Flags); - -void -TrReleaseNode ( - ACPI_PARSE_OBJECT *Op); - -ACPI_PARSE_OBJECT * -TrUpdateNode ( +TrCreateOp ( UINT32 ParseOpcode, - ACPI_PARSE_OBJECT *Op); - -ACPI_PARSE_OBJECT * -TrCreateNode ( - UINT32 ParseOpcode, UINT32 NumChildren, ...); ACPI_PARSE_OBJECT * -TrCreateLeafNode ( +TrCreateLeafOp ( UINT32 ParseOpcode); ACPI_PARSE_OBJECT * -TrCreateNullTarget ( +TrCreateNullTargetOp ( void); ACPI_PARSE_OBJECT * -TrCreateAssignmentNode ( +TrCreateAssignmentOp ( ACPI_PARSE_OBJECT *Target, ACPI_PARSE_OBJECT *Source); ACPI_PARSE_OBJECT * -TrCreateTargetOperand ( +TrCreateTargetOp ( ACPI_PARSE_OBJECT *OriginalOp, ACPI_PARSE_OBJECT *ParentOp); ACPI_PARSE_OBJECT * -TrCreateValuedLeafNode ( +TrCreateValuedLeafOp ( UINT32 ParseOpcode, UINT64 Value); ACPI_PARSE_OBJECT * -TrCreateConstantLeafNode ( +TrCreateConstantLeafOp ( UINT32 ParseOpcode); ACPI_PARSE_OBJECT * -TrLinkChildren ( - ACPI_PARSE_OBJECT *Op, - UINT32 NumChildren, - ...); +TrAllocateOp ( + UINT32 ParseOpcode); void -TrSetEndLineNumber ( +TrPrintOpFlags ( + UINT32 Flags, + UINT32 OutputLevel); + + +/* + * asltree.c - Parse tree management + */ +void +TrSetOpParent ( + ACPI_PARSE_OBJECT *Op, + ACPI_PARSE_OBJECT *ParentOp); + +ACPI_PARSE_OBJECT * +TrSetOpIntegerValue ( + UINT32 ParseOpcode, ACPI_PARSE_OBJECT *Op); void -TrSetCurrentFilename ( +TrSetOpEndLineNumber ( ACPI_PARSE_OBJECT *Op); void -TrWalkTree ( - void); +TrSetOpCurrentFilename ( + ACPI_PARSE_OBJECT *Op); ACPI_PARSE_OBJECT * -TrLinkPeerNode ( +TrLinkOpChildren ( + ACPI_PARSE_OBJECT *Op, + UINT32 NumChildren, + ...); + +ACPI_PARSE_OBJECT * +TrLinkPeerOp ( ACPI_PARSE_OBJECT *Op1, ACPI_PARSE_OBJECT *Op2); ACPI_PARSE_OBJECT * -TrLinkChildNode ( +TrLinkChildOp ( ACPI_PARSE_OBJECT *Op1, ACPI_PARSE_OBJECT *Op2); ACPI_PARSE_OBJECT * -TrSetNodeFlags ( +TrSetOpFlags ( ACPI_PARSE_OBJECT *Op, UINT32 Flags); ACPI_PARSE_OBJECT * -TrSetNodeAmlLength ( +TrSetOpAmlLength ( ACPI_PARSE_OBJECT *Op, UINT32 Length); ACPI_PARSE_OBJECT * -TrLinkPeerNodes ( +TrLinkPeerOps ( UINT32 NumPeers, ...); + +ACPI_STATUS +TrWalkParseTree ( + ACPI_PARSE_OBJECT *Op, + UINT32 Visitation, + ASL_WALK_CALLBACK DescendingCallback, + ASL_WALK_CALLBACK AscendingCallback, + void *Context); /* Modified: vendor-sys/acpica/dist/source/compiler/aslcstyle.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcstyle.y Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslcstyle.y Thu Jun 29 18:42:13 2017 (r320476) @@ -201,59 +201,59 @@ Expression /* Unary operators */ - : PARSEOP_EXP_LOGICAL_NOT {$$ = TrCreateLeafNode (PARSEOP_LNOT);} - TermArg {$$ = TrLinkChildren ($2,1,$3);} - | PARSEOP_EXP_NOT {$$ = TrCreateLeafNode (PARSEOP_NOT);} - TermArg {$$ = TrLinkChildren ($2,2,$3,TrCreateNullTarget ());} + : PARSEOP_EXP_LOGICAL_NOT {$$ = TrCreateLeafOp (PARSEOP_LNOT);} + TermArg {$$ = TrLinkOpChildren ($2,1,$3);} + | PARSEOP_EXP_NOT {$$ = TrCreateLeafOp (PARSEOP_NOT);} + TermArg {$$ = TrLinkOpChildren ($2,2,$3,TrCreateNullTargetOp ());} - | SuperName PARSEOP_EXP_INCREMENT {$$ = TrCreateLeafNode (PARSEOP_INCREMENT);} - {$$ = TrLinkChildren ($3,1,$1);} - | SuperName PARSEOP_EXP_DECREMENT {$$ = TrCreateLeafNode (PARSEOP_DECREMENT);} - {$$ = TrLinkChildren ($3,1,$1);} + | SuperName PARSEOP_EXP_INCREMENT {$$ = TrCreateLeafOp (PARSEOP_INCREMENT);} + {$$ = TrLinkOpChildren ($3,1,$1);} + | SuperName PARSEOP_EXP_DECREMENT {$$ = TrCreateLeafOp (PARSEOP_DECREMENT);} + {$$ = TrLinkOpChildren ($3,1,$1);} /* Binary operators: math and logical */ - | TermArg PARSEOP_EXP_ADD {$$ = TrCreateLeafNode (PARSEOP_ADD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_DIVIDE {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} - TermArg {$$ = TrLinkChildren ($3,4,$1,$4,TrCreateNullTarget (), - TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_MODULO {$$ = TrCreateLeafNode (PARSEOP_MOD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_MULTIPLY {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SHIFT_LEFT {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SHIFT_RIGHT {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_SUBTRACT {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} + | TermArg PARSEOP_EXP_ADD {$$ = TrCreateLeafOp (PARSEOP_ADD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_DIVIDE {$$ = TrCreateLeafOp (PARSEOP_DIVIDE);} + TermArg {$$ = TrLinkOpChildren ($3,4,$1,$4,TrCreateNullTargetOp (), + TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_MODULO {$$ = TrCreateLeafOp (PARSEOP_MOD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_MULTIPLY {$$ = TrCreateLeafOp (PARSEOP_MULTIPLY);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SHIFT_LEFT {$$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SHIFT_RIGHT {$$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_SUBTRACT {$$ = TrCreateLeafOp (PARSEOP_SUBTRACT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} - | TermArg PARSEOP_EXP_AND {$$ = TrCreateLeafNode (PARSEOP_AND);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_OR {$$ = TrCreateLeafNode (PARSEOP_OR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} - | TermArg PARSEOP_EXP_XOR {$$ = TrCreateLeafNode (PARSEOP_XOR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4,TrCreateNullTarget ());} + | TermArg PARSEOP_EXP_AND {$$ = TrCreateLeafOp (PARSEOP_AND);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_OR {$$ = TrCreateLeafOp (PARSEOP_OR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} + | TermArg PARSEOP_EXP_XOR {$$ = TrCreateLeafOp (PARSEOP_XOR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4,TrCreateNullTargetOp ());} - | TermArg PARSEOP_EXP_GREATER {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_GREATER_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LGREATEREQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LESS {$$ = TrCreateLeafNode (PARSEOP_LLESS);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LESS_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LLESSEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_GREATER {$$ = TrCreateLeafOp (PARSEOP_LGREATER);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_GREATER_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LGREATEREQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LESS {$$ = TrCreateLeafOp (PARSEOP_LLESS);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LESS_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LLESSEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_NOT_EQUAL {$$ = TrCreateLeafNode (PARSEOP_LNOTEQUAL);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_NOT_EQUAL {$$ = TrCreateLeafOp (PARSEOP_LNOTEQUAL);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LOGICAL_AND {$$ = TrCreateLeafNode (PARSEOP_LAND);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - | TermArg PARSEOP_EXP_LOGICAL_OR {$$ = TrCreateLeafNode (PARSEOP_LOR);} - TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LOGICAL_AND {$$ = TrCreateLeafOp (PARSEOP_LAND);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} + | TermArg PARSEOP_EXP_LOGICAL_OR {$$ = TrCreateLeafOp (PARSEOP_LOR);} + TermArg {$$ = TrLinkOpChildren ($3,2,$1,$4);} /* Parentheses */ @@ -280,8 +280,8 @@ IndexExpTerm : SuperName PARSEOP_EXP_INDEX_LEFT TermArg - PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); - TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} + PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafOp (PARSEOP_INDEX); + TrLinkOpChildren ($$,3,$1,$3,TrCreateNullTargetOp ());} ; @@ -304,7 +304,7 @@ EqualsTerm | SuperName PARSEOP_EXP_EQUALS - TermArg {$$ = TrCreateAssignmentNode ($1, $3);} + TermArg {$$ = TrCreateAssignmentOp ($1, $3);} /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */ @@ -312,47 +312,47 @@ EqualsTerm EqualsTerm PARSEOP_CLOSE_PAREN PARSEOP_EXP_EQUALS - TermArg {$$ = TrCreateAssignmentNode ($2, $5);} + TermArg {$$ = TrCreateAssignmentOp ($2, $5);} /* Compound assignments -- Add (operand, operand, target) */ - | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafNode (PARSEOP_ADD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafOp (PARSEOP_ADD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_DIV_EQ {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} - TermArg {$$ = TrLinkChildren ($3,4,$1,$4,TrCreateNullTarget (), - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_DIV_EQ {$$ = TrCreateLeafOp (PARSEOP_DIVIDE);} + TermArg {$$ = TrLinkOpChildren ($3,4,$1,$4,TrCreateNullTargetOp (), + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_MOD_EQ {$$ = TrCreateLeafNode (PARSEOP_MOD);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_MOD_EQ {$$ = TrCreateLeafOp (PARSEOP_MOD);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_MUL_EQ {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_MUL_EQ {$$ = TrCreateLeafOp (PARSEOP_MULTIPLY);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SHL_EQ {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SHL_EQ {$$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SHR_EQ {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SHR_EQ {$$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_SUB_EQ {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_SUB_EQ {$$ = TrCreateLeafOp (PARSEOP_SUBTRACT);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_AND_EQ {$$ = TrCreateLeafNode (PARSEOP_AND);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_AND_EQ {$$ = TrCreateLeafOp (PARSEOP_AND);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_OR_EQ {$$ = TrCreateLeafNode (PARSEOP_OR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_OR_EQ {$$ = TrCreateLeafOp (PARSEOP_OR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} - | TermArg PARSEOP_EXP_XOR_EQ {$$ = TrCreateLeafNode (PARSEOP_XOR);} - TermArg {$$ = TrLinkChildren ($3,3,$1,$4, - TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} + | TermArg PARSEOP_EXP_XOR_EQ {$$ = TrCreateLeafOp (PARSEOP_XOR);} + TermArg {$$ = TrLinkOpChildren ($3,3,$1,$4, + TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));} ; Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jun 29 18:42:13 2017 (r320476) @@ -290,7 +290,7 @@ #define ASL_PARSE_TREE_DEBUG2 \ " %08X %04X %04X %01X %04X %04X %05X %05X "\ - "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d\n" + "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d" /* * Macros for ASL/ASL+ converter Modified: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Thu Jun 29 18:42:13 2017 (r320476) @@ -202,7 +202,7 @@ ExDoExternal ( /* Create new list node of arbitrary type */ - ListOp = TrAllocateNode (PARSEOP_DEFAULT_ARG); + ListOp = TrAllocateOp (PARSEOP_DEFAULT_ARG); /* Store External node as child */ @@ -266,7 +266,7 @@ ExInsertArgCount ( /* Skip if External node already handled */ - if (Next->Asl.Child->Asl.CompileFlags & NODE_VISITED) + if (Next->Asl.Child->Asl.CompileFlags & OP_VISITED) { Next = Next->Asl.Next; continue; @@ -282,7 +282,7 @@ ExInsertArgCount ( continue; } - Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED; + Next->Asl.Child->Asl.CompileFlags |= OP_VISITED; /* * Since we will reposition Externals to the Root, set Namepath @@ -544,7 +544,7 @@ ExMoveExternals ( Next->Asl.Child->Asl.Next->Asl.Value.Integer; if (ObjType == ACPI_TYPE_METHOD && - !(Next->Asl.CompileFlags & NODE_VISITED)) + !(Next->Asl.CompileFlags & OP_VISITED)) { if (Next == Prev) { @@ -578,12 +578,12 @@ ExMoveExternals ( Gbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF; Gbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP; - Gbl_ExternalsListHead->Asl.CompileFlags = NODE_AML_PACKAGE; + Gbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE; UtSetParseOpName (Gbl_ExternalsListHead); /* Create a Zero op for the If predicate */ - PredicateOp = TrAllocateNode (PARSEOP_ZERO); + PredicateOp = TrAllocateOp (PARSEOP_ZERO); PredicateOp->Asl.AmlOpcode = AML_ZERO_OP; PredicateOp->Asl.Parent = Gbl_ExternalsListHead; Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 29 17:34:48 2017 (r320475) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 29 18:42:13 2017 (r320476) @@ -232,8 +232,8 @@ OpcAmlConstantWalk ( * Only interested in subtrees that could possibly contain * expressions that can be evaluated at this time */ - if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) || - (Op->Asl.CompileFlags & NODE_IS_TARGET)) + if ((!(Op->Asl.CompileFlags & OP_COMPILE_TIME_CONST)) || + (Op->Asl.CompileFlags & OP_IS_TARGET)) { return (AE_OK); } @@ -412,7 +412,7 @@ OpcAmlCheckForConstant ( { /* Error if there is a target operand */ - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL); Status = AE_TYPE; @@ -420,11 +420,11 @@ OpcAmlCheckForConstant ( /* Error if expression cannot be reduced (folded) */ - if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE)) + if (!(NextOp->Asl.CompileFlags & OP_COULD_NOT_REDUCE)) { /* Ensure only one error message per statement */ - NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE; + NextOp->Asl.CompileFlags |= OP_COULD_NOT_REDUCE; DbgPrint (ASL_PARSE_OUTPUT, "**** Could not reduce operands for NAME opcode ****\n"); @@ -441,7 +441,7 @@ OpcAmlCheckForConstant ( /* This is not a 3/4/5 opcode, but maybe can convert to STORE */ - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { DbgPrint (ASL_PARSE_OUTPUT, "**** Valid Target, transform to Store ****\n"); @@ -484,7 +484,7 @@ OpcAmlCheckForConstant ( DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345"); - if (Op->Asl.CompileFlags & NODE_IS_TARGET) + if (Op->Asl.CompileFlags & OP_IS_TARGET) { if (Op->Asl.ParseOpcode == PARSEOP_ZERO) { @@ -496,7 +496,7 @@ OpcAmlCheckForConstant ( } } - if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG) + if (Op->Asl.CompileFlags & OP_IS_TERM_ARG) { DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG"); } @@ -505,7 +505,7 @@ CleanupAndExit: /* Dump the node compile flags also */ - TrPrintNodeCompileFlags (Op->Asl.CompileFlags); + TrPrintOpFlags (Op->Asl.CompileFlags, ASL_PARSE_OUTPUT); DbgPrint (ASL_PARSE_OUTPUT, "\n"); return (Status); } @@ -543,7 +543,7 @@ TrSimpleConstantReduction ( /* Allocate a new temporary root for this subtree */ - RootOp = TrAllocateNode (PARSEOP_INTEGER); + RootOp = TrAllocateOp (PARSEOP_INTEGER); if (!RootOp) { return (AE_NO_MEMORY); @@ -654,7 +654,7 @@ TrTransformToStoreOp ( * Create a NULL (zero) target so that we can use the * interpreter to evaluate the expression. */ - NewTarget = TrCreateNullTarget (); + NewTarget = TrCreateNullTargetOp (); NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP; /* Handle one-operand cases (NOT, TOBCD, etc.) */ @@ -670,7 +670,7 @@ TrTransformToStoreOp ( Child2->Asl.Next = NewTarget; NewTarget->Asl.Parent = OriginalTarget->Asl.Parent; - NewParent = TrAllocateNode (PARSEOP_INTEGER); + NewParent = TrAllocateOp (PARSEOP_INTEGER); NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP; OriginalParent = Op->Common.Parent; @@ -799,12 +799,12 @@ TrInstallReducedConstant ( */ Op->Asl.ParseOpcode = PARSEOP_BUFFER; Op->Common.AmlOpcode = AML_BUFFER_OP; - Op->Asl.CompileFlags = NODE_AML_PACKAGE; + Op->Asl.CompileFlags = OP_AML_PACKAGE; UtSetParseOpName (Op); /* Child node is the buffer length */ - LengthOp = TrAllocateNode (PARSEOP_INTEGER); + LengthOp = TrAllocateOp (PARSEOP_INTEGER); LengthOp->Asl.AmlOpcode = AML_DWORD_OP; LengthOp->Asl.Value.Integer = ObjDesc->Buffer.Length; @@ -815,7 +815,7 @@ TrInstallReducedConstant ( /* Next child is the raw buffer data */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Jun 29 18:42:51 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24AC5DA2EC5; Thu, 29 Jun 2017 18:42:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2E56E7B2; Thu, 29 Jun 2017 18:42:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5TIgnNQ046915; Thu, 29 Jun 2017 18:42:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5TIgn9K046914; Thu, 29 Jun 2017 18:42:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201706291842.v5TIgn9K046914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 29 Jun 2017 18:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320477 - vendor-sys/acpica/20170629 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20170629 X-SVN-Commit-Revision: 320477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 18:42:51 -0000 Author: jkim Date: Thu Jun 29 18:42:49 2017 New Revision: 320477 URL: https://svnweb.freebsd.org/changeset/base/320477 Log: Tag ACPICA 20170629. Added: vendor-sys/acpica/20170629/ - copied from r320476, vendor-sys/acpica/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:22:06 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4163D895D0; Sat, 1 Jul 2017 13:22:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A5F794; Sat, 1 Jul 2017 13:22:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DM5uD021919; Sat, 1 Jul 2017 13:22:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DM3V7021898; Sat, 1 Jul 2017 13:22:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011322.v61DM3V7021898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320533 - in vendor/llvm/dist: . bindings/ocaml/target docs docs/CommandGuide include/llvm include/llvm-c/Transforms include/llvm/Analysis include/llvm/BinaryFormat include/llvm/Bitcode... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist: . bindings/ocaml/target docs docs/CommandGuide include/llvm include/llvm-c/Transforms include/llvm/Analysis include/llvm/BinaryFormat include/llvm/Bitcode include/llvm/CodeGen inc... X-SVN-Commit-Revision: 320533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:22:06 -0000 Author: dim Date: Sat Jul 1 13:22:02 2017 New Revision: 320533 URL: https://svnweb.freebsd.org/changeset/base/320533 Log: Vendor import of llvm trunk r306956: https://llvm.org/svn/llvm-project/llvm/trunk@306956 Added: vendor/llvm/dist/docs/Docker.rst vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/ARMScheduleM3.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrSystem.td vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-extracts.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-undef.mir vendor/llvm/dist/test/CodeGen/AArch64/ccmp-successor-probs.mir vendor/llvm/dist/test/CodeGen/AMDGPU/alignbit-pat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-and-sext-bool.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fold-fmul-to-neg-abs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/misched-killflags.mir vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs-mac-operands.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole-instr.mir vendor/llvm/dist/test/CodeGen/AMDGPU/setcc-sext.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-to-smem-m0.ll vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-O0-be.ll vendor/llvm/dist/test/CodeGen/BPF/remove_truncate_1.ll vendor/llvm/dist/test/CodeGen/BPF/remove_truncate_2.ll vendor/llvm/dist/test/CodeGen/Hexagon/addrmode-keepdeadphis.mir vendor/llvm/dist/test/CodeGen/Hexagon/expand-condsets-undefvni.ll vendor/llvm/dist/test/CodeGen/Hexagon/expand-vselect-kill.ll vendor/llvm/dist/test/CodeGen/Hexagon/fpelim-basic.ll vendor/llvm/dist/test/CodeGen/Hexagon/jt-in-text.ll vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump-kill2.mir vendor/llvm/dist/test/CodeGen/Hexagon/regalloc-liveout-undef.mir vendor/llvm/dist/test/CodeGen/PowerPC/merge_stores_dereferenceable.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls_get_addr_fence1.mir vendor/llvm/dist/test/CodeGen/PowerPC/tls_get_addr_fence2.mir vendor/llvm/dist/test/CodeGen/Thumb2/ifcvt-no-branch-predictor.ll vendor/llvm/dist/test/CodeGen/WebAssembly/exception.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/and-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fadd-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fdiv-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fmul-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/fsub-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-and-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fadd-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fdiv-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fmul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-fsub-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-or-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-xor-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/or-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-and-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fadd-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fdiv-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fmul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-fsub-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-merge-vec256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-merge-vec512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-or-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-xor-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/xor-scalar.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-vec-masked-cmp.ll vendor/llvm/dist/test/CodeGen/X86/bswap-wide-int.ll vendor/llvm/dist/test/CodeGen/X86/peephole-recurrence.mir vendor/llvm/dist/test/CodeGen/X86/vector-truncate-combine.ll vendor/llvm/dist/test/DebugInfo/COFF/lines-bb-start.ll vendor/llvm/dist/test/LTO/Resolution/X86/Inputs/comdat-mixed-lto.ll vendor/llvm/dist/test/LTO/Resolution/X86/comdat-mixed-lto.ll vendor/llvm/dist/test/MC/AArch64/coff-basic.ll vendor/llvm/dist/test/MC/Mips/macro-dla-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/macro-dla-pic.s (contents, props changed) vendor/llvm/dist/test/MC/WebAssembly/weak-alias.ll vendor/llvm/dist/test/MC/WebAssembly/weak.ll vendor/llvm/dist/test/MC/X86/signed-coff-pcrel.s (contents, props changed) vendor/llvm/dist/test/Object/X86/irsymtab-asm.ll vendor/llvm/dist/test/Object/X86/irsymtab-bad-alias.ll vendor/llvm/dist/test/Object/X86/irsymtab.ll vendor/llvm/dist/test/Object/X86/yaml-elf-x86-rel-broken.yaml vendor/llvm/dist/test/Transforms/CodeExtractor/BlockAddressReference.ll vendor/llvm/dist/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll vendor/llvm/dist/test/Transforms/CodeGenPrepare/nonintegral.ll vendor/llvm/dist/test/Transforms/ConstantHoisting/ARM/gep-struct-index.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/inline-target-attr.ll vendor/llvm/dist/test/Transforms/Inline/inline-cold-callsite-pgo.ll vendor/llvm/dist/test/Transforms/Inline/pr33637.ll vendor/llvm/dist/test/Transforms/InstCombine/clamp-to-minmax.ll vendor/llvm/dist/test/Transforms/InstCombine/extractinsert-tbaa.ll vendor/llvm/dist/test/Transforms/JumpThreading/range-compare.ll vendor/llvm/dist/test/Transforms/LICM/dropped-tbaa.ll vendor/llvm/dist/test/Transforms/LoopUnroll/AArch64/falkor-prefetch.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll vendor/llvm/dist/test/Transforms/LoopUnroll/unroll-maxcount.ll vendor/llvm/dist/test/Transforms/Reassociate/erase_inst_made_change.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/limit.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/ vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/lit.local.cfg vendor/llvm/dist/test/Transforms/SimplifyCFG/Hexagon/switch-to-lookup-table.ll vendor/llvm/dist/test/tools/llvm-cvtres/symbols.test vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_data.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_form.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_num_atoms.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/demangle.ll vendor/llvm/dist/test/tools/llvm-objdump/ARM/invalid-instruction.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/relocations.test vendor/llvm/dist/test/tools/llvm-pdbdump/partial-type-stream.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/trivial.obj.coff-arm64 (contents, props changed) vendor/llvm/dist/unittests/Support/ErrnoTest.cpp (contents, props changed) vendor/llvm/dist/utils/docker/ vendor/llvm/dist/utils/docker/README vendor/llvm/dist/utils/docker/build_docker_image.sh (contents, props changed) vendor/llvm/dist/utils/docker/debian8/ vendor/llvm/dist/utils/docker/debian8/build/ vendor/llvm/dist/utils/docker/debian8/build/Dockerfile vendor/llvm/dist/utils/docker/debian8/release/ vendor/llvm/dist/utils/docker/debian8/release/Dockerfile vendor/llvm/dist/utils/docker/example/ vendor/llvm/dist/utils/docker/example/build/ vendor/llvm/dist/utils/docker/example/build/Dockerfile vendor/llvm/dist/utils/docker/example/release/ vendor/llvm/dist/utils/docker/example/release/Dockerfile vendor/llvm/dist/utils/docker/nvidia-cuda/ vendor/llvm/dist/utils/docker/nvidia-cuda/build/ vendor/llvm/dist/utils/docker/nvidia-cuda/build/Dockerfile vendor/llvm/dist/utils/docker/nvidia-cuda/release/ vendor/llvm/dist/utils/docker/nvidia-cuda/release/Dockerfile vendor/llvm/dist/utils/docker/scripts/ vendor/llvm/dist/utils/docker/scripts/build_install_llvm.sh (contents, props changed) vendor/llvm/dist/utils/opt-viewer/optpmap.py (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStreamBuilder.h vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStreamBuilder.cpp vendor/llvm/dist/lib/Target/AMDGPU/SITypeRewriter.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs-invalid-mac-operands.mir vendor/llvm/dist/test/CodeGen/ARM/Windows/no-arm-mode.ll vendor/llvm/dist/test/CodeGen/Hexagon/frame.ll vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/adiw-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/in-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/lds-fail.s vendor/llvm/dist/test/MC/AVR/out-of-range-fixups/sbi-fail.s vendor/llvm/dist/test/Transforms/BBVectorize/X86/cmp-types.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/loop1.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/pr15289.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec2.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-rec3.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/sh-types.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple-int.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple-ldstr.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/simple.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/vs-cast.ll vendor/llvm/dist/test/Transforms/BBVectorize/X86/wr-aliases.ll vendor/llvm/dist/test/Transforms/BBVectorize/cycle.ll vendor/llvm/dist/test/Transforms/BBVectorize/func-alias.ll vendor/llvm/dist/test/Transforms/BBVectorize/ld1.ll vendor/llvm/dist/test/Transforms/BBVectorize/lit.local.cfg vendor/llvm/dist/test/Transforms/BBVectorize/loop1.ll vendor/llvm/dist/test/Transforms/BBVectorize/mem-op-depth.ll vendor/llvm/dist/test/Transforms/BBVectorize/metadata.ll vendor/llvm/dist/test/Transforms/BBVectorize/no-ldstr-conn.ll vendor/llvm/dist/test/Transforms/BBVectorize/req-depth.ll vendor/llvm/dist/test/Transforms/BBVectorize/search-limit.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-int.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-ldstr.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-sel.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple-tst.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple.ll vendor/llvm/dist/test/Transforms/BBVectorize/simple3.ll vendor/llvm/dist/test/Transforms/BBVectorize/vector-sel.ll vendor/llvm/dist/test/Transforms/BBVectorize/xcore/no-vector-registers.ll vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/apple_names_verify_buckets.s vendor/llvm/dist/test/tools/llvm-dwarfdump/X86/no_apple_names_verify_buckets.s Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/XRay.rst vendor/llvm/dist/docs/index.rst vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/RegionIterator.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/BinaryFormat/COFF.h vendor/llvm/dist/include/llvm/BinaryFormat/Dwarf.h vendor/llvm/dist/include/llvm/BinaryFormat/Wasm.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeReader.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/CallLowering.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/InstructionSelector.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Types.h vendor/llvm/dist/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachinePassRegistry.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/MacroFusion.h vendor/llvm/dist/include/llvm/CodeGen/PseudoSourceValue.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/TargetPassConfig.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossExSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugCrossImpSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/EnumTables.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/Formatters.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringsAndChecksums.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeServerHandler.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBDataStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/Hash.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/HashTable.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeSession.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDB.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBExtras.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBTypes.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/UDTLayout.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h vendor/llvm/dist/include/llvm/IR/Argument.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/Constant.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/DerivedTypes.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GlobalAlias.h vendor/llvm/dist/include/llvm/IR/GlobalIFunc.h vendor/llvm/dist/include/llvm/IR/GlobalIndirectSymbol.h vendor/llvm/dist/include/llvm/IR/GlobalObject.h vendor/llvm/dist/include/llvm/IR/GlobalVariable.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicInst.h vendor/llvm/dist/include/llvm/IR/IntrinsicsWebAssembly.td vendor/llvm/dist/include/llvm/IR/LLVMContext.h vendor/llvm/dist/include/llvm/IR/LegacyPassNameParser.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFObjectWriter.h vendor/llvm/dist/include/llvm/Object/Archive.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/COFFImportFile.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/IRObjectFile.h vendor/llvm/dist/include/llvm/Object/IRSymtab.h vendor/llvm/dist/include/llvm/Object/MachOUniversal.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/SymbolicFile.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/ObjectYAML/COFFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLTypes.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFEmitter.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/ELFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/MachOYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/ObjectYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/YAML.h vendor/llvm/dist/include/llvm/Passes/PassBuilder.h vendor/llvm/dist/include/llvm/ProfileData/Coverage/CoverageMapping.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/Support/CMakeLists.txt vendor/llvm/dist/include/llvm/Support/Errno.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/TargetParser.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/Target/GenericOpcodes.td vendor/llvm/dist/include/llvm/Target/GlobalISel/SelectionDAGCompat.td vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.def vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/include/llvm/Transforms/SampleProfile.h vendor/llvm/dist/include/llvm/Transforms/Scalar/ConstantHoisting.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/OrderedInstructions.h vendor/llvm/dist/include/llvm/Transforms/Utils/PredicateInfo.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/include/llvm/Transforms/Vectorize.h vendor/llvm/dist/lib/Analysis/CFLAndersAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CFLSteensAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/IteratedDominanceFrontier.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/OptimizationDiagnosticInfo.cpp vendor/llvm/dist/lib/Analysis/RegionInfo.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/BinaryFormat/Magic.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/LLVMBuild.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.h vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelector.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerHelper.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/LegalizerInfo.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegBankSelect.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.h vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.cpp vendor/llvm/dist/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp vendor/llvm/dist/lib/CodeGen/MacroFusion.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RenameIndependentSubregs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/Formatters.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/StringsAndChecksums.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolSerializer.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeSerializer.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFVerifier.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleList.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/Hash.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/HashTable.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeSession.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDB.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBExtras.cpp vendor/llvm/dist/lib/DebugInfo/PDB/UDTLayout.cpp vendor/llvm/dist/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/Dominators.cpp vendor/llvm/dist/lib/IR/LLVMContext.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/IRSymtab.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/COFFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFEmitter.cpp vendor/llvm/dist/lib/ObjectYAML/DWARFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/ELFYAML.cpp vendor/llvm/dist/lib/ObjectYAML/MachOYAML.cpp vendor/llvm/dist/lib/ObjectYAML/ObjectYAML.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/ObjectYAML/YAML.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/Coverage/CoverageMapping.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/Support/AMDGPUCodeObjectMetadata.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/TargetParser.cpp vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Support/Unix/Process.inc vendor/llvm/dist/lib/Target/AArch64/AArch64CondBrTuning.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ConditionalCompares.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstructionSelector.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64LegalizerInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.h vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SchedThunderX2T99.td vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstructionSelector.cpp vendor/llvm/dist/lib/Target/ARM/ARMLegalizerInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMSchedule.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp vendor/llvm/dist/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h vendor/llvm/dist/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonNewValueJump.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonOptAddrMode.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetTransformInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MicroMips64r6InstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPCCTRLoops.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTLSDynamicCall.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp vendor/llvm/dist/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h vendor/llvm/dist/lib/Target/SystemZ/README.txt vendor/llvm/dist/lib/Target/SystemZ/SystemZ.td vendor/llvm/dist/lib/Target/SystemZ/SystemZFeatures.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFormats.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ13.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ196.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZEC12.td vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.h vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrControl.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Transforms/Coroutines/CoroInstr.h vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/IPO/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Scalar/ConstantHoisting.cpp vendor/llvm/dist/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerMemIntrinsics.cpp vendor/llvm/dist/lib/Transforms/Utils/OrderedInstructions.cpp vendor/llvm/dist/lib/Transforms/Utils/PredicateInfo.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/lib/Transforms/Vectorize/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/lib/Transforms/Vectorize/Vectorize.cpp vendor/llvm/dist/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/limit-depth.ll vendor/llvm/dist/test/Bitcode/thinlto-alias.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary-refgraph.ll vendor/llvm/dist/test/Bitcode/thinlto-function-summary.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/call-translator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/irtranslator-exceptions.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-trunc.mir vendor/llvm/dist/test/CodeGen/AArch64/arm64-ccmp.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-spill-remarks.ll vendor/llvm/dist/test/CodeGen/AArch64/cond-br-tuning.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bug-vopc-commute.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-bitfield-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/code-object-metadata-from-llvm-ir-full.ll vendor/llvm/dist/test/CodeGen/AMDGPU/combine-cond-add-sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.load.dword.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mubuf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ret_jump.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scheduler-subrange-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-vectors.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sgpr-copy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-i64-opts.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-lod-bias.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-sgpr-spill.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-spill-cf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/split-smrd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll vendor/llvm/dist/test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-instruction-select.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-isel.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir vendor/llvm/dist/test/CodeGen/ARM/Windows/chkstk-movw-movt-isel.ll vendor/llvm/dist/test/CodeGen/ARM/Windows/tls.ll vendor/llvm/dist/test/CodeGen/ARM/alloca.ll vendor/llvm/dist/test/CodeGen/ARM/arg-copy-elide.ll vendor/llvm/dist/test/CodeGen/ARM/arm-abi-attr.ll vendor/llvm/dist/test/CodeGen/ARM/arm-and-tst-peephole.ll vendor/llvm/dist/test/CodeGen/ARM/arm-position-independence-jump-table.ll vendor/llvm/dist/test/CodeGen/ARM/arm-shrink-wrapping-linux.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-cmpxchg.ll vendor/llvm/dist/test/CodeGen/ARM/bool-ext-inc.ll vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-weak.ll vendor/llvm/dist/test/CodeGen/ARM/code-placement.ll vendor/llvm/dist/test/CodeGen/ARM/constantfp.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/cortexr52-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/ctor_order.ll vendor/llvm/dist/test/CodeGen/ARM/ctors_dtors.ll vendor/llvm/dist/test/CodeGen/ARM/cttz.ll vendor/llvm/dist/test/CodeGen/ARM/cttz_vector.ll vendor/llvm/dist/test/CodeGen/ARM/cxx-tlscc.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-big-stack-frame.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only-section.ll vendor/llvm/dist/test/CodeGen/ARM/execute-only.ll vendor/llvm/dist/test/CodeGen/ARM/fp16-promote.ll vendor/llvm/dist/test/CodeGen/ARM/fp16-v3.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt7.ll vendor/llvm/dist/test/CodeGen/ARM/illegal-bitfield-loadstore.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/jump-table-islands.ll vendor/llvm/dist/test/CodeGen/ARM/jump-table-tbh.ll vendor/llvm/dist/test/CodeGen/ARM/ldm-stm-i256.ll vendor/llvm/dist/test/CodeGen/ARM/legalize-unaligned-load.ll vendor/llvm/dist/test/CodeGen/ARM/long-setcc.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/ARM/select_const.ll vendor/llvm/dist/test/CodeGen/ARM/shift-i64.ll vendor/llvm/dist/test/CodeGen/ARM/ssp-data-layout.ll vendor/llvm/dist/test/CodeGen/ARM/str_pre-2.ll vendor/llvm/dist/test/CodeGen/ARM/swifterror.ll vendor/llvm/dist/test/CodeGen/ARM/thumb2-it-block.ll vendor/llvm/dist/test/CodeGen/ARM/vcgt.ll vendor/llvm/dist/test/CodeGen/ARM/vector-DAGCombine.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/ARM/vfp.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vld2.ll vendor/llvm/dist/test/CodeGen/ARM/vld3.ll vendor/llvm/dist/test/CodeGen/ARM/vld4.ll vendor/llvm/dist/test/CodeGen/ARM/vlddup.ll vendor/llvm/dist/test/CodeGen/ARM/vldlane.ll vendor/llvm/dist/test/CodeGen/ARM/vpadd.ll vendor/llvm/dist/test/CodeGen/ARM/vst1.ll vendor/llvm/dist/test/CodeGen/ARM/vst4.ll vendor/llvm/dist/test/CodeGen/ARM/vstlane.ll vendor/llvm/dist/test/CodeGen/ARM/vuzp.ll vendor/llvm/dist/test/CodeGen/Hexagon/newvaluejump2.ll vendor/llvm/dist/test/CodeGen/MIR/Generic/multiRunPass.mir vendor/llvm/dist/test/CodeGen/Mips/2008-06-05-Carry.ll vendor/llvm/dist/test/CodeGen/Mips/dsp-patterns.ll vendor/llvm/dist/test/CodeGen/Mips/llcarry.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/add.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/sub.ll vendor/llvm/dist/test/CodeGen/Mips/madd-msub.ll vendor/llvm/dist/test/CodeGen/NVPTX/lower-aggr-copies.ll vendor/llvm/dist/test/CodeGen/PowerPC/anon_aggr.ll vendor/llvm/dist/test/CodeGen/PowerPC/floatPSA.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmp.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmpIR.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-align-long-double.ll vendor/llvm/dist/test/CodeGen/PowerPC/tls.ll vendor/llvm/dist/test/CodeGen/Thumb/long-setcc.ll vendor/llvm/dist/test/CodeGen/Thumb2/constant-islands-new-island.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt2.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-add.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-sub.mir vendor/llvm/dist/test/CodeGen/X86/atom-call-reg-indirect.ll vendor/llvm/dist/test/CodeGen/X86/atom-fixup-lea2.ll vendor/llvm/dist/test/CodeGen/X86/atom-sched.ll vendor/llvm/dist/test/CodeGen/X86/avx2-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx2-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx2-conversions.ll vendor/llvm/dist/test/CodeGen/X86/avx2-fma-fneg-combine.ll vendor/llvm/dist/test/CodeGen/X86/avx2-gather.ll vendor/llvm/dist/test/CodeGen/X86/avx2-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx2-phaddsub.ll vendor/llvm/dist/test/CodeGen/X86/avx2-shift.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vector-shifts.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vperm.ll vendor/llvm/dist/test/CodeGen/X86/avx512-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/bswap-vector.ll vendor/llvm/dist/test/CodeGen/X86/compress_expand.ll vendor/llvm/dist/test/CodeGen/X86/cpus.ll vendor/llvm/dist/test/CodeGen/X86/fp128-cast.ll vendor/llvm/dist/test/CodeGen/X86/insertelement-zero.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shift.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shuffle-bug.ll vendor/llvm/dist/test/CodeGen/X86/masked_memop.ll vendor/llvm/dist/test/CodeGen/X86/memcmp.ll vendor/llvm/dist/test/CodeGen/X86/palignr.ll vendor/llvm/dist/test/CodeGen/X86/sbb.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v8.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/DebugInfo/COFF/local-variables.ll vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-headers.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/dwarfdump-accel.test vendor/llvm/dist/test/Feature/optnone-opt.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/msan_basic.ll vendor/llvm/dist/test/MC/AMDGPU/code-object-metadata-kernel-args.s vendor/llvm/dist/test/MC/AMDGPU/code-object-metadata-kernel-attrs.s vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns.txt vendor/llvm/dist/test/MC/Mips/micromips64r6/valid.s vendor/llvm/dist/test/MC/Mips/mips3/valid.s vendor/llvm/dist/test/MC/Mips/mips4/valid.s vendor/llvm/dist/test/MC/Mips/mips5/valid.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s vendor/llvm/dist/test/MC/Mips/mips64r3/valid.s vendor/llvm/dist/test/MC/Mips/mips64r5/valid.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-bad.s vendor/llvm/dist/test/MC/SystemZ/insn-good-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-good-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-good.s vendor/llvm/dist/test/MC/SystemZ/regs-bad.s vendor/llvm/dist/test/MC/SystemZ/regs-good.s vendor/llvm/dist/test/MC/WebAssembly/unnamed-data.ll vendor/llvm/dist/test/MC/X86/intel-syntax-bitwise-ops.s vendor/llvm/dist/test/ObjectYAML/wasm/weak_symbols.yaml vendor/llvm/dist/test/Other/new-pm-defaults.ll vendor/llvm/dist/test/Other/new-pm-thinlto-defaults.ll vendor/llvm/dist/test/ThinLTO/X86/autoupgrade.ll vendor/llvm/dist/test/Transforms/CodeGenPrepare/X86/memcmp.ll vendor/llvm/dist/test/Transforms/Inline/inline-cold-callsite.ll vendor/llvm/dist/test/Transforms/Inline/optimization-remarks-yaml.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-not.ll vendor/llvm/dist/test/Transforms/InstCombine/ffs-1.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/logical-select.ll vendor/llvm/dist/test/Transforms/InstCombine/max-of-nots.ll vendor/llvm/dist/test/Transforms/InstCombine/memmove.ll vendor/llvm/dist/test/Transforms/InstCombine/memset.ll vendor/llvm/dist/test/Transforms/InstCombine/mul.ll vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/select-cmp-cttz-ctlz.ll vendor/llvm/dist/test/Transforms/InstCombine/select-with-bitwise-ops.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll vendor/llvm/dist/test/Transforms/LoopVectorize/first-order-recurrence.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conversion.ll vendor/llvm/dist/test/Transforms/LoopVectorize/minmax_reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/small-loop.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/export-icall.ll vendor/llvm/dist/test/Transforms/SROA/alloca-address-space.ll vendor/llvm/dist/test/Transforms/SROA/preserve-nonnull.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll vendor/llvm/dist/test/tools/llvm-nm/wasm/weak-symbols.yaml vendor/llvm/dist/test/tools/llvm-readobj/file-headers.test vendor/llvm/dist/test/tools/llvm-readobj/peplus.test vendor/llvm/dist/test/tools/llvm-readobj/symbols.test vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-lto2/CMakeLists.txt vendor/llvm/dist/tools/llvm-lto2/LLVMBuild.txt vendor/llvm/dist/tools/llvm-lto2/llvm-lto2.cpp vendor/llvm/dist/tools/llvm-nm/CMakeLists.txt vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbutil/DumpOutputStyle.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/MinimalSymbolDumper.h vendor/llvm/dist/tools/llvm-pdbutil/MinimalTypeDumper.cpp vendor/llvm/dist/tools/llvm-pdbutil/PdbYaml.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.cpp vendor/llvm/dist/tools/llvm-pdbutil/llvm-pdbutil.h vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/WasmDumper.cpp vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/CMakeLists.txt vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DwarfGenerator.h vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/ProfileData/CoverageMappingTest.cpp vendor/llvm/dist/unittests/Support/CMakeLists.txt vendor/llvm/dist/unittests/Support/YAMLIOTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenSchedule.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/lit/lit/formats/__init__.py vendor/llvm/dist/utils/lit/lit/formats/base.py vendor/llvm/dist/utils/lit/lit/formats/googletest.py vendor/llvm/dist/utils/lit/lit/formats/shtest.py vendor/llvm/dist/utils/lit/lit/run.py vendor/llvm/dist/utils/lit/lit/util.py vendor/llvm/dist/utils/opt-viewer/opt-diff.py vendor/llvm/dist/utils/opt-viewer/opt-stats.py vendor/llvm/dist/utils/opt-viewer/opt-viewer.py vendor/llvm/dist/utils/opt-viewer/optrecord.py Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CMakeLists.txt Sat Jul 1 13:22:02 2017 (r320533) @@ -206,7 +206,7 @@ endif() include(VersionFromVCS) option(LLVM_APPEND_VC_REV - "Append the version control system revision id to LLVM version" OFF) + "Embed the version control system revision id in LLVM" ON) if( LLVM_APPEND_VC_REV ) add_version_info_from_vcs(PACKAGE_VERSION) Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CODE_OWNERS.TXT Sat Jul 1 13:22:02 2017 (r320533) @@ -70,7 +70,7 @@ D: Branch weights and BlockFrequencyInfo N: Hal Finkel E: hfinkel@anl.gov -D: BBVectorize, the loop reroller, alias analysis and the PowerPC target +D: The loop reroller, alias analysis and the PowerPC target N: Dan Gohman E: sunfish@mozilla.com Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/CREDITS.TXT Sat Jul 1 13:22:02 2017 (r320533) @@ -318,11 +318,12 @@ D: Support for implicit TLS model used with MS VC runt D: Dumping of Win64 EH structures N: Takumi Nakamura +I: chapuni E: geek4civic@gmail.com E: chapuni@hf.rim.or.jp -D: Cygwin and MinGW support. -D: Win32 tweaks. -S: Yokohama, Japan +D: Maintaining the Git monorepo +W: https://github.com/llvm-project/ +S: Ebina, Japan N: Edward O'Callaghan E: eocallaghan@auroraux.org Modified: vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c Sat Jul 1 13:22:02 2017 (r320533) @@ -77,7 +77,7 @@ CAMLprim value llvm_datalayout_pointer_size(value DL) /* Llvm.llcontext -> DataLayout.t -> Llvm.lltype */ CAMLprim LLVMTypeRef llvm_datalayout_intptr_type(LLVMContextRef C, value DL) { - return LLVMIntPtrTypeInContext(C, DataLayout_val(DL));; + return LLVMIntPtrTypeInContext(C, DataLayout_val(DL)); } /* int -> DataLayout.t -> int */ Modified: vendor/llvm/dist/docs/CMake.rst ============================================================================== --- vendor/llvm/dist/docs/CMake.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/CMake.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -247,9 +247,10 @@ LLVM-specific variables tests. **LLVM_APPEND_VC_REV**:BOOL - Append version control revision info (svn revision number or Git revision id) - to LLVM version string (stored in the PACKAGE_VERSION macro). For this to work - cmake must be invoked before the build. Defaults to OFF. + Embed version control revision info (svn revision number or Git revision id). + This is used among other things in the LLVM version string (stored in the + PACKAGE_VERSION macro). For this to work cmake must be invoked before the + build. Defaults to ON. **LLVM_ENABLE_THREADS**:BOOL Build with threads support, if available. Defaults to ON. Modified: vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/CommandGuide/llvm-nm.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -134,9 +134,6 @@ OPTIONS BUGS ---- - * :program:`llvm-nm` cannot demangle C++ mangled names, like GNU :program:`nm` - can. - * :program:`llvm-nm` does not support the full set of arguments that GNU :program:`nm` does. Added: vendor/llvm/dist/docs/Docker.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/docs/Docker.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -0,0 +1,205 @@ +========================================= +A guide to Dockerfiles for building LLVM +========================================= + +Introduction +============ +You can find a number of sources to build docker images with LLVM components in +``llvm/utils/docker``. They can be used by anyone who wants to build the docker +images for their own use, or as a starting point for someone who wants to write +their own Dockerfiles. + +We currently provide Dockerfiles with ``debian8`` and ``nvidia-cuda`` base images. +We also provide an ``example`` image, which contains placeholders that one would need +to fill out in order to produce Dockerfiles for a new docker image. + +Why? +---- +Docker images provide a way to produce binary distributions of +software inside a controlled environment. Having Dockerfiles to builds docker images +inside LLVM repo makes them much more discoverable than putting them into any other +place. + +Docker basics +------------- +If you've never heard about Docker before, you might find this section helpful +to get a very basic explanation of it. +`Docker `_ is a popular solution for running programs in +an isolated and reproducible environment, especially to maintain releases for +software deployed to large distributed fleets. +It uses linux kernel namespaces and cgroups to provide a lightweight isolation +inside currently running linux kernel. +A single active instance of dockerized environment is called a *docker +container*. +A snapshot of a docker container filesystem is called a *docker image*. +One can start a container from a prebuilt docker image. + +Docker images are built from a so-called *Dockerfile*, a source file written in +a specialized language that defines instructions to be used when build +the docker image (see `official +documentation `_ for more +details). A minimal Dockerfile typically contains a base image and a number +of RUN commands that have to be executed to build the image. When building a new +image, docker will first download your base image, mount its filesystem as +read-only and then add a writable overlay on top of it to keep track of all +filesystem modifications, performed while building your image. When the build +process is finished, a diff between your image's final filesystem state and the +base image's filesystem is stored in the resulting image. + +Overview +======== +The ``llvm/utils/docker`` folder contains Dockerfiles and simple bash scripts to +serve as a basis for anyone who wants to create their own Docker image with +LLVM components, compiled from sources. The sources are checked out from the +upstream svn repository when building the image. + +Inside each subfolder we host Dockerfiles for two images: + +- ``build/`` image is used to compile LLVM, it installs a system compiler and all + build dependencies of LLVM. After the build process is finished, the build + image will have an archive with compiled components at ``/tmp/clang.tar.gz``. +- ``release/`` image usually only contains LLVM components, compiled by the + ``build/`` image, and also libstdc++ and binutils to make image minimally + useful for C++ development. The assumption is that you usually want clang to + be one of the provided components. + +To build both of those images, use ``build_docker_image.sh`` script. +It will checkout LLVM sources and build clang in the ``build`` container, copy results +of the build to the local filesystem and then build the ``release`` container using +those. The ``build_docker_image.sh`` accepts a list of LLVM repositories to +checkout, and arguments for CMake invocation. + +If you want to write your own docker image, start with an ``example/`` subfolder. +It provides incomplete Dockerfiles with (very few) FIXMEs explaining the steps +you need to take in order to make your Dockerfiles functional. + +Usage +===== +The ``llvm/utils/build_docker_image.sh`` script provides a rather high degree of +control on how to run the build. It allows you to specify the projects to +checkout from svn and provide a list of CMake arguments to use during when +building LLVM inside docker container. + +Here's a very simple example of getting a docker image with clang binary, +compiled by the system compiler in the debian8 image: + +.. code-block:: bash + + ./llvm/utils/docker/build_docker_image.sh \ + --source debian8 \ + --docker-repository clang-debian8 --docker-tag "staging" \ + -- \ + -p clang -i install-clang -i install-clang-headers \ + -- \ + -DCMAKE_BUILD_TYPE=Release + +Note there are two levels of ``--`` indirection. First one separates +``build_docker_image.sh`` arguments from ``llvm/utils/build_install_llvm.sh`` +arguments. Second one separates CMake arguments from ``build_install_llvm.sh`` +arguments. Note that build like that doesn't use a 2-stage build process that +you probably want for clang. Running a 2-stage build is a little more intricate, +this command will do that: + +.. code-block:: bash + + # Run a 2-stage build. + # LLVM_TARGETS_TO_BUILD=Native is to reduce stage1 compile time. + # Options, starting with BOOTSTRAP_* are passed to stage2 cmake invocation. + ./build_docker_image.sh \ + --source debian8 \ + --docker-repository clang-debian8 --docker-tag "staging" \ + -- \ + -p clang -i stage2-install-clang -i stage2-install-clang-headers \ + -- \ + -DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \ + -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \ + -DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers" + +This will produce two images, a release image ``clang-debian8:staging`` and a +build image ``clang-debian8-build:staging`` from the latest upstream revision. +After the image is built you can run bash inside a container based on your +image like this: + +.. code-block:: bash + + docker run -ti clang-debian8:staging bash + +Now you can run bash commands as you normally would: + +.. code-block:: bash + + root@80f351b51825:/# clang -v + clang version 5.0.0 (trunk 305064) + Target: x86_64-unknown-linux-gnu + Thread model: posix + InstalledDir: /bin + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 + Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2 + Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 + Candidate multilib: .;@m64 + Selected multilib: .;@m64 + + +Which image should I choose? +============================ +We currently provide two images: debian8-based and nvidia-cuda-based. They +differ in the base image that they use, i.e. they have a different set of +preinstalled binaries. Debian8 is very minimal, nvidia-cuda is larger, but has +preinstalled CUDA libraries and allows to access a GPU, installed on your +machine. + +If you need a minimal linux distribution with only clang and libstdc++ included, +you should try debian8-based image. + +If you want to use CUDA libraries and have access to a GPU on your machine, +you should choose nvidia-cuda-based image and use `nvidia-docker +`_ to run your docker containers. Note +that you don't need nvidia-docker to build the images, but you need it in order +to have an access to GPU from a docker container that is running the built +image. + +If you have a different use-case, you could create your own image based on +``example/`` folder. + +Any docker image can be built and run using only the docker binary, i.e. you can +run debian8 build on Fedora or any other Linux distribution. You don't need to +install CMake, compilers or any other clang dependencies. It is all handled +during the build process inside Docker's isolated environment. + +Stable build +============ +If you want a somewhat recent and somewhat stable build, use the +``branches/google/stable`` branch, i.e. the following command will produce a +debian8-based image using the latest ``google/stable`` sources for you: + +.. code-block:: bash + + ./llvm/utils/docker/build_docker_image.sh \ + -s debian8 --d clang-debian8 -t "staging" \ + -- \ + --branch branches/google/stable \ + -p clang -i install-clang -i install-clang-headers \ + -- \ + -DCMAKE_BUILD_TYPE=Release + + +Minimizing docker image size +============================ +Due to Docker restrictions we use two images (i.e., build and release folders) +for the release image to be as small as possible. It's much easier to achieve +that using two images, because Docker would store a filesystem layer for each +command in the Dockerfile, i.e. if you install some packages in one command, +then remove those in a separate command, the size of the resulting image will +still be proportinal to the size of an image with installed packages. +Therefore, we strive to provide a very simple release image which only copies +compiled clang and does not do anything else. + +Docker 1.13 added a ``--squash`` flag that allows to flatten the layers of the +image, i.e. remove the parts that were actually deleted. That is an easier way +to produce the smallest images possible by using just a single image. We do not +use it because as of today the flag is in experimental stage and not everyone +may have the latest docker version available. When the flag is out of +experimental stage, we should investigate replacing two images approach with +just a single image, built using ``--squash`` flag. Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -54,9 +54,10 @@ Non-comprehensive list of changes in this release its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. +* The ``BBVectorize`` pass has been removed. It was fully replaced and no + longer used back in 2014 but we didn't get around to removing it. Now it is + gone. The SLP vectorizer is the suggested non-loop vectorization pass. -* ... next change ... - .. NOTE If you would like to document a larger change, then you can add a subsection about it right here. You can copy the following boilerplate @@ -106,6 +107,15 @@ Changes to the OCaml bindings ----------------------------- During this release ... + + +Changes to the C API +-------------------- + +* Deprecated the ``LLVMAddBBVectorizePass`` interface since the ``BBVectorize`` + pass has been removed. It is now a no-op and will be removed in the next + release. Use ``LLVMAddSLPVectorizePass`` instead to get the supported SLP + vectorizer. External Open Source Projects Using LLVM 5 Modified: vendor/llvm/dist/docs/XRay.rst ============================================================================== --- vendor/llvm/dist/docs/XRay.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/XRay.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -150,7 +150,7 @@ variable, where we list down the options and their def | xray_logfile_base | ``const char*`` | ``xray-log.`` | Filename base for the | | | | | XRay logfile. | +-------------------+-----------------+---------------+------------------------+ -| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | +| xray_fdr_log | ``bool`` | ``false`` | Whether to install the | | | | | Flight Data Recorder | | | | | (FDR) mode. | +-------------------+-----------------+---------------+------------------------+ Modified: vendor/llvm/dist/docs/index.rst ============================================================================== --- vendor/llvm/dist/docs/index.rst Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/docs/index.rst Sat Jul 1 13:22:02 2017 (r320533) @@ -91,6 +91,7 @@ representation. CompileCudaWithLLVM ReportingGuide Benchmarking + Docker :doc:`GettingStarted` Discusses how to get up and running quickly with the LLVM infrastructure. @@ -160,6 +161,9 @@ representation. :doc:`Frontend/PerformanceTips` A collection of tips for frontend authors on how to generate IR which LLVM is able to effectively optimize. + +:doc:`Docker` + A reference for using Dockerfiles provided with LLVM. Programming Documentation Modified: vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm-c/Transforms/Vectorize.h Sat Jul 1 13:22:02 2017 (r320533) @@ -33,7 +33,7 @@ extern "C" { * @{ */ -/** See llvm::createBBVectorizePass function. */ +/** DEPRECATED - Use LLVMAddSLPVectorizePass */ void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); /** See llvm::createLoopVectorizePass function. */ Modified: vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h Sat Jul 1 13:22:02 2017 (r320533) @@ -69,10 +69,15 @@ class AliasSet : public ilist_node { if (AAInfo == DenseMapInfo::getEmptyKey()) // We don't have a AAInfo yet. Set it to NewAAInfo. AAInfo = NewAAInfo; - else if (AAInfo != NewAAInfo) - // NewAAInfo conflicts with AAInfo. - AAInfo = DenseMapInfo::getTombstoneKey(); - + else { + AAMDNodes Intersection(AAInfo.intersect(NewAAInfo)); + if (!Intersection) { + // NewAAInfo conflicts with AAInfo. + AAInfo = DenseMapInfo::getTombstoneKey(); + return SizeChanged; + } + AAInfo = Intersection; + } return SizeChanged; } Added: vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/Analysis/CFLAliasAnalysisUtils.h Sat Jul 1 13:22:02 2017 (r320533) @@ -0,0 +1,58 @@ +//=- CFLAliasAnalysisUtils.h - Utilities for CFL Alias Analysis ----*- C++-*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// \file +// These are the utilities/helpers used by the CFL Alias Analyses available in +// tree, i.e. Steensgaard's and Andersens'. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H +#define LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H + +#include "llvm/IR/Function.h" +#include "llvm/IR/ValueHandle.h" + +namespace llvm { +namespace cflaa { + +template struct FunctionHandle final : public CallbackVH { + FunctionHandle(Function *Fn, AAResult *Result) + : CallbackVH(Fn), Result(Result) { + assert(Fn != nullptr); + assert(Result != nullptr); + } + + void deleted() override { removeSelfFromCache(); } + void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } + +private: + AAResult *Result; + + void removeSelfFromCache() { + assert(Result != nullptr); + auto *Val = getValPtr(); + Result->evict(cast(Val)); + setValPtr(nullptr); + } +}; + +static inline const Function *parentFunctionOfValue(const Value *Val) { + if (auto *Inst = dyn_cast(Val)) { + auto *Bb = Inst->getParent(); + return Bb->getParent(); + } + + if (auto *Arg = dyn_cast(Val)) + return Arg->getParent(); + return nullptr; +} // namespace cflaa +} // namespace llvm +} + +#endif // LLVM_ANALYSIS_CFLALIASANALYSISUTILS_H Modified: vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/CFLAndersAliasAnalysis.h Sat Jul 1 13:22:02 2017 (r320533) @@ -18,8 +18,8 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/IR/Function.h" -#include "llvm/IR/ValueHandle.h" #include "llvm/Pass.h" #include @@ -47,7 +47,7 @@ class CFLAndersAAResult : public AAResultBaseevict(*cast(Val)); - setValPtr(nullptr); - } - }; - /// \brief Ensures that the given function is available in the cache. /// Returns the appropriate entry from the cache. const Optional &ensureCached(const Function &); @@ -97,7 +76,7 @@ class CFLAndersAAResult : public AAResultBase> Cache; - std::forward_list Handles; + std::forward_list> Handles; }; /// Analysis pass providing a never-invalidated alias analysis result. Modified: vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/CFLSteensAliasAnalysis.h Sat Jul 1 13:22:02 2017 (r320533) @@ -19,6 +19,7 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/CFLAliasAnalysisUtils.h" #include "llvm/IR/Function.h" #include "llvm/IR/Module.h" #include "llvm/IR/ValueHandle.h" @@ -85,27 +86,6 @@ class CFLSteensAAResult : public AAResultBaseevict(cast(Val)); - setValPtr(nullptr); - } - }; - const TargetLibraryInfo &TLI; /// \brief Cached mapping of Functions to their StratifiedSets. @@ -114,7 +94,7 @@ class CFLSteensAAResult : public AAResultBase> Cache; - std::forward_list Handles; + std::forward_list> Handles; FunctionInfo buildSetsFrom(Function *F); }; Modified: vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/IteratedDominanceFrontier.h Sat Jul 1 13:22:02 2017 (r320533) @@ -86,7 +86,6 @@ class IDFCalculator { (public) private: DominatorTreeBase &DT; bool useLiveIn; - DenseMap DomLevels; const SmallPtrSetImpl *LiveInBlocks; const SmallPtrSetImpl *DefBlocks; }; Modified: vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/MemorySSA.h Sat Jul 1 13:22:02 2017 (r320533) @@ -139,7 +139,7 @@ class MemoryAccess (public) // Methods for support type inquiry through isa, cast, and // dyn_cast - static inline bool classof(const Value *V) { + static bool classof(const Value *V) { unsigned ID = V->getValueID(); return ID == MemoryUseVal || ID == MemoryPhiVal || ID == MemoryDefVal; } @@ -241,7 +241,7 @@ class MemoryUseOrDef : public MemoryAccess { (public) /// \brief Get the access that produces the memory state used by this Use. MemoryAccess *getDefiningAccess() const { return getOperand(0); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryUseVal || MA->getValueID() == MemoryDefVal; } @@ -297,7 +297,7 @@ class MemoryUse final : public MemoryUseOrDef { (publi // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryUseVal; } @@ -353,7 +353,7 @@ class MemoryDef final : public MemoryUseOrDef { (publi // allocate space for exactly one operand void *operator new(size_t s) { return User::operator new(s, 1); } - static inline bool classof(const Value *MA) { + static bool classof(const Value *MA) { return MA->getValueID() == MemoryDefVal; } @@ -526,7 +526,7 @@ class MemoryPhi final : public MemoryAccess { (public) return getIncomingValue(Idx); } - static inline bool classof(const Value *V) { + static bool classof(const Value *V) { return V->getValueID() == MemoryPhiVal; } Modified: vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/OptimizationDiagnosticInfo.h Sat Jul 1 13:22:02 2017 (r320533) @@ -34,7 +34,7 @@ class Value; /// /// It allows reporting when optimizations are performed and when they are not /// along with the reasons for it. Hotness information of the corresponding -/// code region can be included in the remark if DiagnosticHotnessRequested is +/// code region can be included in the remark if DiagnosticsHotnessRequested is /// enabled in the LLVM context. class OptimizationRemarkEmitter { public: @@ -45,10 +45,10 @@ class OptimizationRemarkEmitter { (public) /// analysis pass). /// /// Note that this ctor has a very different cost depending on whether - /// F->getContext().getDiagnosticHotnessRequested() is on or not. If it's off + /// F->getContext().getDiagnosticsHotnessRequested() is on or not. If it's off /// the operation is free. /// - /// Whereas if DiagnosticHotnessRequested is on, it is fairly expensive + /// Whereas if DiagnosticsHotnessRequested is on, it is fairly expensive /// operation since BFI and all its required analyses are computed. This is /// for example useful for CGSCC passes that can't use function analyses /// passes in the old PM. Modified: vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h Sat Jul 1 13:03:02 2017 (r320532) +++ vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h Sat Jul 1 13:22:02 2017 (r320533) @@ -37,18 +37,38 @@ #ifndef LLVM_ANALYSIS_REGIONINFO_H #define LLVM_ANALYSIS_REGIONINFO_H +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/iterator_range.h" -#include "llvm/IR/CFG.h" +#include "llvm/IR/BasicBlock.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/PassManager.h" +#include "llvm/Pass.h" +#include "llvm/Support/raw_ostream.h" +#include +#include #include #include #include +#include +#include +#include namespace llvm { +class DominanceFrontier; +class DominatorTree; +class Loop; +class LoopInfo; +struct PostDominatorTree; +class Region; +template class RegionBase; +class RegionInfo; +template class RegionInfoBase; +class RegionNode; + // Class to be specialized for different users of RegionInfo // (i.e. BasicBlocks or MachineBasicBlocks). This is only to avoid needing to // pass around an unreasonable number of template parameters. @@ -59,37 +79,23 @@ struct RegionTraits { // RegionT // RegionNodeT // RegionInfoT - typedef typename FuncT_::UnknownRegionTypeError BrokenT; + using BrokenT = typename FuncT_::UnknownRegionTypeError; }; -class DominatorTree; -class DominanceFrontier; -class Loop; -class LoopInfo; -struct PostDominatorTree; -class raw_ostream; -class Region; -template -class RegionBase; -class RegionNode; -class RegionInfo; -template -class RegionInfoBase; - template <> struct RegionTraits { - typedef Function FuncT; - typedef BasicBlock BlockT; - typedef Region RegionT; - typedef RegionNode RegionNodeT; - typedef RegionInfo RegionInfoT; - typedef DominatorTree DomTreeT; - typedef DomTreeNode DomTreeNodeT; - typedef DominanceFrontier DomFrontierT; - typedef PostDominatorTree PostDomTreeT; - typedef Instruction InstT; - typedef Loop LoopT; - typedef LoopInfo LoopInfoT; + using FuncT = Function; + using BlockT = BasicBlock; + using RegionT = Region; + using RegionNodeT = RegionNode; + using RegionInfoT = RegionInfo; + using DomTreeT = DominatorTree; + using DomTreeNodeT = DomTreeNode; + using DomFrontierT = DominanceFrontier; + using PostDomTreeT = PostDominatorTree; + using InstT = Instruction; + using LoopT = Loop; + using LoopInfoT = LoopInfo; static unsigned getNumSuccessors(BasicBlock *BB) { return BB->getTerminator()->getNumSuccessors(); @@ -113,13 +119,10 @@ class RegionNodeBase { friend class RegionBase; public: - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionT RegionT; + using BlockT = typename Tr::BlockT; + using RegionT = typename Tr::RegionT; private: - RegionNodeBase(const RegionNodeBase &) = delete; - const RegionNodeBase &operator=(const RegionNodeBase &) = delete; - /// This is the entry basic block that starts this region node. If this is a /// BasicBlock RegionNode, then entry is just the basic block, that this /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode. @@ -150,6 +153,9 @@ class RegionNodeBase { : entry(Entry, isSubRegion), parent(Parent) {} public: + RegionNodeBase(const RegionNodeBase &) = delete; + RegionNodeBase &operator=(const RegionNodeBase &) = delete; + /// @brief Get the parent Region of this RegionNode. /// /// The parent Region is the Region this RegionNode belongs to. If for @@ -247,25 +253,23 @@ class RegionNodeBase { /// tree, the second one creates a graphical representation using graphviz. template class RegionBase : public RegionNodeBase { - typedef typename Tr::FuncT FuncT; - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionNodeT RegionNodeT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::LoopT LoopT; - typedef typename Tr::LoopInfoT LoopInfoT; - typedef typename Tr::InstT InstT; - - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - friend class RegionInfoBase; - RegionBase(const RegionBase &) = delete; - const RegionBase &operator=(const RegionBase &) = delete; + + using FuncT = typename Tr::FuncT; + using BlockT = typename Tr::BlockT; + using RegionInfoT = typename Tr::RegionInfoT; + using RegionT = typename Tr::RegionT; + using RegionNodeT = typename Tr::RegionNodeT; + using DomTreeT = typename Tr::DomTreeT; + using LoopT = typename Tr::LoopT; + using LoopInfoT = typename Tr::LoopInfoT; + using InstT = typename Tr::InstT; + using BlockTraits = GraphTraits; + using InvBlockTraits = GraphTraits>; + using SuccIterTy = typename BlockTraits::ChildIteratorType; + using PredIterTy = typename InvBlockTraits::ChildIteratorType; + // Information necessary to manage this Region. RegionInfoT *RI; DomTreeT *DT; @@ -274,12 +278,12 @@ class RegionBase : public RegionNodeBase { // (The entry BasicBlock is part of RegionNode) BlockT *exit; - typedef std::vector> RegionSet; + using RegionSet = std::vector>; // The subregions of this region. RegionSet children; - typedef std::map> BBNodeMapT; + using BBNodeMapT = std::map>; // Save the BasicBlock RegionNodes that are element of this Region. mutable BBNodeMapT BBNodeMap; @@ -308,6 +312,9 @@ class RegionBase : public RegionNodeBase { RegionBase(BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent = nullptr); + RegionBase(const RegionBase &) = delete; + RegionBase &operator=(const RegionBase &) = delete; + /// Delete the Region and all its subregions. ~RegionBase(); @@ -543,8 +550,8 @@ class RegionBase : public RegionNodeBase { /// /// These iterators iterator over all subregions of this Region. //@{ - typedef typename RegionSet::iterator iterator; - typedef typename RegionSet::const_iterator const_iterator; + using iterator = typename RegionSet::iterator; + using const_iterator = typename RegionSet::const_iterator; iterator begin() { return children.begin(); } iterator end() { return children.end(); } @@ -563,12 +570,13 @@ class RegionBase : public RegionNodeBase { class block_iterator_wrapper : public df_iterator< typename std::conditional::type *> { - typedef df_iterator< - typename std::conditional::type *> super; + using super = + df_iterator< + typename std::conditional::type *>; public: - typedef block_iterator_wrapper Self; - typedef typename super::value_type value_type; + using Self = block_iterator_wrapper; + using value_type = typename super::value_type; // Construct the begin iterator. block_iterator_wrapper(value_type Entry, value_type Exit) @@ -592,8 +600,8 @@ class RegionBase : public RegionNodeBase { } }; - typedef block_iterator_wrapper block_iterator; - typedef block_iterator_wrapper const_block_iterator; + using block_iterator = block_iterator_wrapper; + using const_block_iterator = block_iterator_wrapper; block_iterator block_begin() { return block_iterator(getEntry(), getExit()); } @@ -604,8 +612,8 @@ class RegionBase : public RegionNodeBase { } const_block_iterator block_end() const { return const_block_iterator(); } - typedef iterator_range block_range; - typedef iterator_range const_block_range; + using block_range = iterator_range; + using const_block_range = iterator_range; /// @brief Returns a range view of the basic blocks in the region. inline block_range blocks() { @@ -626,14 +634,14 @@ class RegionBase : public RegionNodeBase { /// are direct children of this Region. It does not iterate over any /// RegionNodes that are also element of a subregion of this Region. //@{ - typedef df_iterator, - false, GraphTraits> - element_iterator; + using element_iterator = + df_iterator, false, + GraphTraits>; - typedef df_iterator, false, - GraphTraits> - const_element_iterator; + using const_element_iterator = + df_iterator, false, + GraphTraits>; element_iterator element_begin(); element_iterator element_end(); @@ -661,36 +669,34 @@ inline raw_ostream &operator<<(raw_ostream &OS, const /// Tree. template class RegionInfoBase { - typedef typename Tr::BlockT BlockT; - typedef typename Tr::FuncT FuncT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::DomTreeNodeT DomTreeNodeT; - typedef typename Tr::PostDomTreeT PostDomTreeT; - typedef typename Tr::DomFrontierT DomFrontierT; - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - friend class RegionInfo; friend class MachineRegionInfo; - typedef DenseMap BBtoBBMap; - typedef DenseMap BBtoRegionMap; - RegionInfoBase(); - virtual ~RegionInfoBase(); + using BlockT = typename Tr::BlockT; + using FuncT = typename Tr::FuncT; + using RegionT = typename Tr::RegionT; + using RegionInfoT = typename Tr::RegionInfoT; + using DomTreeT = typename Tr::DomTreeT; + using DomTreeNodeT = typename Tr::DomTreeNodeT; + using PostDomTreeT = typename Tr::PostDomTreeT; + using DomFrontierT = typename Tr::DomFrontierT; + using BlockTraits = GraphTraits; + using InvBlockTraits = GraphTraits>; + using SuccIterTy = typename BlockTraits::ChildIteratorType; + using PredIterTy = typename InvBlockTraits::ChildIteratorType; - RegionInfoBase(const RegionInfoBase &) = delete; - const RegionInfoBase &operator=(const RegionInfoBase &) = delete; + using BBtoBBMap = DenseMap; + using BBtoRegionMap = DenseMap; + RegionInfoBase(); + RegionInfoBase(RegionInfoBase &&Arg) : DT(std::move(Arg.DT)), PDT(std::move(Arg.PDT)), DF(std::move(Arg.DF)), TopLevelRegion(std::move(Arg.TopLevelRegion)), BBtoRegion(std::move(Arg.BBtoRegion)) { Arg.wipe(); } + RegionInfoBase &operator=(RegionInfoBase &&RHS) { DT = std::move(RHS.DT); PDT = std::move(RHS.PDT); @@ -701,12 +707,14 @@ class RegionInfoBase { return *this; } + virtual ~RegionInfoBase(); + DomTreeT *DT; PostDomTreeT *PDT; DomFrontierT *DF; /// The top level region. - RegionT *TopLevelRegion; + RegionT *TopLevelRegion = nullptr; /// Map every BB to the smallest region, that contains BB. BBtoRegionMap BBtoRegion; @@ -785,6 +793,9 @@ class RegionInfoBase { void calculate(FuncT &F); public: + RegionInfoBase(const RegionInfoBase &) = delete; + RegionInfoBase &operator=(const RegionInfoBase &) = delete; + static bool VerifyRegionInfo; static typename RegionT::PrintStyle printStyle; @@ -887,21 +898,22 @@ class Region : public RegionBase> { public: - typedef RegionInfoBase> Base; + using Base = RegionInfoBase>; explicit RegionInfo(); - ~RegionInfo() override; - RegionInfo(RegionInfo &&Arg) : Base(std::move(static_cast(Arg))) { updateRegionTree(*this, TopLevelRegion); } + RegionInfo &operator=(RegionInfo &&RHS) { Base::operator=(std::move(static_cast(RHS))); updateRegionTree(*this, TopLevelRegion); return *this; } + ~RegionInfo() override; + /// Handle invalidation explicitly. bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &); @@ -931,8 +943,8 @@ class RegionInfoPass : public FunctionPass { public: static char ID; - explicit RegionInfoPass(); + explicit RegionInfoPass(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:22:11 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5240D895DB; Sat, 1 Jul 2017 13:22:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA647AC; Sat, 1 Jul 2017 13:22:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DMAfr021965; Sat, 1 Jul 2017 13:22:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DMANe021964; Sat, 1 Jul 2017 13:22:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011322.v61DMANe021964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320534 - vendor/llvm/llvm-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-trunk-r306956 X-SVN-Commit-Revision: 320534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:22:12 -0000 Author: dim Date: Sat Jul 1 13:22:10 2017 New Revision: 320534 URL: https://svnweb.freebsd.org/changeset/base/320534 Log: Tag llvm trunk r306956. Added: vendor/llvm/llvm-trunk-r306956/ - copied from r320533, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:09 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5457DD8971C; Sat, 1 Jul 2017 13:24:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECFB8AE5; Sat, 1 Jul 2017 13:24:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DO8at022102; Sat, 1 Jul 2017 13:24:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DO6PT022078; Sat, 1 Jul 2017 13:24:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DO6PT022078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320535 - in vendor/clang/dist: bindings/python/clang bindings/python/tests docs include/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/F... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist: bindings/python/clang bindings/python/tests docs include/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Format include/clang/Front... X-SVN-Commit-Revision: 320535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:09 -0000 Author: dim Date: Sat Jul 1 13:24:05 2017 New Revision: 320535 URL: https://svnweb.freebsd.org/changeset/base/320535 Log: Vendor import of clang trunk r306956: https://llvm.org/svn/llvm-project/cfe/trunk@306956 Added: vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py (contents, props changed) vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/ vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/RenamingAction.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFinder.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRLocFinder.h (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/ vendor/clang/dist/lib/Tooling/Refactoring/Rename/RenamingAction.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFinder.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp (contents, props changed) vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/arm-execute-only.c (contents, props changed) vendor/clang/dist/test/CodeGen/lto-newpm-pipeline.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/dllexport-dtor-thunks.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/msabi-blocks.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/stret-lifetime.m vendor/clang/dist/test/CodeGenObjCXX/arc-indirect.mm vendor/clang/dist/test/Driver/nios2-cpu.c (contents, props changed) vendor/clang/dist/test/Driver/unavailable_aligned_allocation.cpp (contents, props changed) vendor/clang/dist/test/Index/ctor-init-source-loc.cpp (contents, props changed) vendor/clang/dist/test/Modules/Inputs/F.framework/ vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/F.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.private.modulemap vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/ vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/ vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Base.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Derive.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/H3.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/module.map vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/ vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.modulemap vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.modulemap vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/main.modulemap vendor/clang/dist/test/Modules/lookup-assert-protocol.m vendor/clang/dist/test/Modules/preprocess-decluse.cpp (contents, props changed) vendor/clang/dist/test/Modules/redefinition-c-tagtypes.m vendor/clang/dist/test/Profile/Inputs/cxx-missing-bodies.proftext vendor/clang/dist/test/Profile/cxx-missing-bodies.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/eval-crashes.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/unavailable_aligned_allocation.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ vendor/clang/dist/test/clang-rename/ClassAsTemplateArgument.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassFindByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassSimpleRenaming.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassTestMulti.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ClassTestMultiByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ComplexFunctionOverride.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/ComplicatedClassType.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Ctor.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/CtorInitializer.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/DeclRefExpr.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Field.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionOverride.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/FunctionWithClassFindByName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/IncludeHeaderWithSymbol.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Inputs/ vendor/clang/dist/test/clang-rename/Inputs/HeaderWithSymbol.h (contents, props changed) vendor/clang/dist/test/clang-rename/Inputs/OffsetToNewName.yaml vendor/clang/dist/test/clang-rename/Inputs/QualifiedNameToNewName.yaml vendor/clang/dist/test/clang-rename/InvalidNewName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/InvalidOffset.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/InvalidQualifiedName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/MemberExprMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Namespace.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/NoNewName.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplateClassInstantiation.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplateTypename.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/TemplatedClassFunction.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/UserDefinedConversion.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/Variable.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/VariableMacro.cpp (contents, props changed) vendor/clang/dist/test/clang-rename/YAMLInput.cpp (contents, props changed) vendor/clang/dist/tools/clang-rename/ vendor/clang/dist/tools/clang-rename/CMakeLists.txt (contents, props changed) vendor/clang/dist/tools/clang-rename/ClangRename.cpp (contents, props changed) vendor/clang/dist/tools/clang-rename/clang-rename.el vendor/clang/dist/tools/clang-rename/clang-rename.py (contents, props changed) vendor/clang/dist/unittests/Rename/ vendor/clang/dist/unittests/Rename/CMakeLists.txt (contents, props changed) vendor/clang/dist/unittests/Rename/ClangRenameTest.h (contents, props changed) vendor/clang/dist/unittests/Rename/RenameClassTest.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/CastExprTest.cpp (contents, props changed) Modified: vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/NSAPI.h vendor/clang/dist/include/clang/AST/OpenMPClause.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Redeclarable.h vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Basic/OpenMPKinds.def vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/TargetBuiltins.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/Basic/Visibility.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/DiagnosticRenderer.h vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/PTHLexer.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/include/clang/module.modulemap vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/ODRHash.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/Basic/SourceLocation.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/CodeGenPGO.cpp vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/Arch/ARM.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/CommonArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp vendor/clang/dist/lib/Driver/ToolChains/Darwin.h vendor/clang/dist/lib/Driver/ToolChains/MipsLinux.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/NamespaceEndCommentsFixer.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.h vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/DiagnosticRenderer.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/ModuleDependencyCollector.cpp vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/lib/Tooling/Refactoring/AtomicChange.cpp vendor/clang/dist/lib/Tooling/Refactoring/CMakeLists.txt vendor/clang/dist/test/Analysis/malloc-overflow2.c vendor/clang/dist/test/Analysis/unix-fns.c vendor/clang/dist/test/CMakeLists.txt vendor/clang/dist/test/CodeGen/arm-v8.1a-neon-intrinsics.c vendor/clang/dist/test/CodeGen/avx512f-builtins.c vendor/clang/dist/test/CodeGen/builtins-wasm.c vendor/clang/dist/test/CodeGen/mangle-ms.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/named_reg_global.c vendor/clang/dist/test/CodeGen/neon-immediate-ubsan.c vendor/clang/dist/test/CodeGen/pgo-sample-thinlto-summary.c vendor/clang/dist/test/CodeGen/xray-attributes-supported.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms.cpp vendor/clang/dist/test/CodeGenObjC/ivar-type-encoding.m vendor/clang/dist/test/CodeGenObjC/parameterized_classes.m vendor/clang/dist/test/CodeGenObjC/protocol-comdat.m vendor/clang/dist/test/CodeGenObjC/stret-1.m vendor/clang/dist/test/CodeGenOpenCL/addr-space-struct-arg.cl vendor/clang/dist/test/Driver/arm-execute-only.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/darwin-version.c vendor/clang/dist/test/Driver/fuzzer.c vendor/clang/dist/test/Driver/openmp-offload.c vendor/clang/dist/test/Driver/windows-cross.c vendor/clang/dist/test/FixIt/fixit-format-darwin.m vendor/clang/dist/test/FixIt/format-darwin.m vendor/clang/dist/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext vendor/clang/dist/test/Frontend/optimization-remark-with-hotness.c vendor/clang/dist/test/Index/get-cursor.cpp vendor/clang/dist/test/Index/linkage.c vendor/clang/dist/test/Modules/diag-flags.cpp vendor/clang/dist/test/Modules/elaborated-type-specifier-from-hidden-module.m vendor/clang/dist/test/Modules/odr_hash.cpp vendor/clang/dist/test/Modules/redefinition-same-header.m vendor/clang/dist/test/OpenMP/parallel_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen_global_capture.cpp vendor/clang/dist/test/OpenMP/target_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_data_use_device_ptr_codegen.cpp vendor/clang/dist/test/OpenMP/target_enter_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_exit_data_codegen.cpp vendor/clang/dist/test/OpenMP/target_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/target_is_device_ptr_codegen.cpp vendor/clang/dist/test/OpenMP/target_map_codegen.cpp vendor/clang/dist/test/OpenMP/target_parallel_codegen.cpp vendor/clang/dist/test/OpenMP/target_teams_codegen.cpp vendor/clang/dist/test/OpenMP/target_update_codegen.cpp vendor/clang/dist/test/OpenMP/taskloop_ast_print.cpp vendor/clang/dist/test/OpenMP/taskloop_simd_ast_print.cpp vendor/clang/dist/test/PCH/attrs.c vendor/clang/dist/test/Preprocessor/aarch64-target-features.c vendor/clang/dist/test/Preprocessor/arm-target-features.c vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist/test/Preprocessor/predefined-macros.c vendor/clang/dist/test/Profile/cxx-structors.cpp vendor/clang/dist/test/Sema/diagnose_if.c vendor/clang/dist/test/Sema/integer-overflow.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaCXX/warn-throw-out-noexcept-func.cpp vendor/clang/dist/test/SemaOpenCL/extension-begin.cl vendor/clang/dist/test/SemaTemplate/destructor-template.cpp vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/c-index-test/core_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/unittests/CMakeLists.txt vendor/clang/dist/unittests/Driver/ToolChainTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJava.cpp vendor/clang/dist/unittests/Format/FormatTestProto.cpp vendor/clang/dist/unittests/Format/SortIncludesTest.cpp vendor/clang/dist/unittests/Tooling/CMakeLists.txt vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTest.cpp vendor/clang/dist/unittests/Tooling/RefactoringTest.cpp vendor/clang/dist/unittests/Tooling/TestVisitor.h vendor/clang/dist/utils/bash-autocomplete.sh Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/bindings/python/clang/cindex.py Sat Jul 1 13:24:05 2017 (r320535) @@ -1367,6 +1367,30 @@ TemplateArgumentKind.DECLARATION = TemplateArgumentKin TemplateArgumentKind.NULLPTR = TemplateArgumentKind(3) TemplateArgumentKind.INTEGRAL = TemplateArgumentKind(4) +### Exception Specification Kinds ### +class ExceptionSpecificationKind(BaseEnumeration): + """ + An ExceptionSpecificationKind describes the kind of exception specification + that a function has. + """ + + # The required BaseEnumeration declarations. + _kinds = [] + _name_map = None + + def __repr__(self): + return 'ExceptionSpecificationKind.{}'.format(self.name) + +ExceptionSpecificationKind.NONE = ExceptionSpecificationKind(0) +ExceptionSpecificationKind.DYNAMIC_NONE = ExceptionSpecificationKind(1) +ExceptionSpecificationKind.DYNAMIC = ExceptionSpecificationKind(2) +ExceptionSpecificationKind.MS_ANY = ExceptionSpecificationKind(3) +ExceptionSpecificationKind.BASIC_NOEXCEPT = ExceptionSpecificationKind(4) +ExceptionSpecificationKind.COMPUTED_NOEXCEPT = ExceptionSpecificationKind(5) +ExceptionSpecificationKind.UNEVALUATED = ExceptionSpecificationKind(6) +ExceptionSpecificationKind.UNINSTANTIATED = ExceptionSpecificationKind(7) +ExceptionSpecificationKind.UNPARSED = ExceptionSpecificationKind(8) + ### Cursors ### class Cursor(Structure): @@ -1587,6 +1611,18 @@ class Cursor(Structure): return self._result_type @property + def exception_specification_kind(self): + ''' + Retrieve the exception specification kind, which is one of the values + from the ExceptionSpecificationKind enumeration. + ''' + if not hasattr(self, '_exception_specification_kind'): + exc_kind = conf.lib.clang_getCursorExceptionSpecificationType(self) + self._exception_specification_kind = ExceptionSpecificationKind.from_id(exc_kind) + + return self._exception_specification_kind + + @property def underlying_typedef_type(self): """Return the underlying type of a typedef declaration. @@ -2253,6 +2289,14 @@ class Type(Structure): conf.lib.clang_Type_visitFields(self, callbacks['fields_visit'](visitor), fields) return iter(fields) + + def get_exception_specification_kind(self): + """ + Return the kind of the exception specification; a value from + the ExceptionSpecificationKind enumeration. + """ + return ExceptionSpecificationKind.from_id( + conf.lib.clang.getExceptionSpecificationType(self)) @property def spelling(self): Added: vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py Sat Jul 1 13:24:05 2017 (r320535) @@ -0,0 +1,27 @@ +import clang.cindex +from clang.cindex import ExceptionSpecificationKind +from .util import get_tu + + +def find_function_declarations(node, declarations=[]): + if node.kind == clang.cindex.CursorKind.FUNCTION_DECL: + declarations.append((node.spelling, node.exception_specification_kind)) + for child in node.get_children(): + declarations = find_function_declarations(child, declarations) + return declarations + + +def test_exception_specification_kind(): + source = """int square1(int x); + int square2(int x) noexcept; + int square3(int x) noexcept(noexcept(x * x));""" + + tu = get_tu(source, lang='cpp', flags=['-std=c++14']) + + declarations = find_function_declarations(tu.cursor) + expected = [ + ('square1', ExceptionSpecificationKind.NONE), + ('square2', ExceptionSpecificationKind.BASIC_NOEXCEPT), + ('square3', ExceptionSpecificationKind.COMPUTED_NOEXCEPT) + ] + assert declarations == expected Modified: vendor/clang/dist/docs/UsersManual.rst ============================================================================== --- vendor/clang/dist/docs/UsersManual.rst Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/docs/UsersManual.rst Sat Jul 1 13:24:05 2017 (r320535) @@ -322,18 +322,27 @@ output format of the diagnostics that it generates. by category, so it should be a high level category. We want dozens of these, not hundreds or thousands of them. +.. _opt_fsave-optimization-record: + +**-fsave-optimization-record** + Write optimization remarks to a YAML file. + + This option, which defaults to off, controls whether Clang writes + optimization reports to a YAML file. By recording diagnostics in a file, + using a structured YAML format, users can parse or sort the remarks in a + convenient way. + .. _opt_fdiagnostics-show-hotness: **-f[no-]diagnostics-show-hotness** Enable profile hotness information in diagnostic line. - This option, which defaults to off, controls whether Clang prints the - profile hotness associated with a diagnostics in the presence of - profile-guided optimization information. This is currently supported with - optimization remarks (see :ref:`Options to Emit Optimization Reports - `). The hotness information allows users to focus on the hot - optimization remarks that are likely to be more relevant for run-time - performance. + This option controls whether Clang prints the profile hotness associated + with diagnostics in the presence of profile-guided optimization information. + This is currently supported with optimization remarks (see + :ref:`Options to Emit Optimization Reports `). The hotness information + allows users to focus on the hot optimization remarks that are likely to be + more relevant for run-time performance. For example, in this output, the block containing the callsite of `foo` was executed 3000 times according to the profile data: @@ -343,6 +352,23 @@ output format of the diagnostics that it generates. s.c:7:10: remark: foo inlined into bar (hotness: 3000) [-Rpass-analysis=inline] sum += foo(x, x - 2); ^ + + This option is implied when + :ref:`-fsave-optimization-record ` is used. + Otherwise, it defaults to off. + +.. _opt_fdiagnostics-hotness-threshold: + +**-fdiagnostics-hotness-threshold** + Prevent optimization remarks from being output if they do not have at least + this hotness value. + + This option, which defaults to zero, controls the minimum hotness an + optimization remark would need in order to be output by Clang. This is + currently supported with optimization remarks (see :ref:`Options to Emit + Optimization Reports `) when profile hotness information in + diagnostics is enabled (see + :ref:`-fdiagnostics-show-hotness `). .. _opt_fdiagnostics-fixit-info: Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang-c/Index.h Sat Jul 1 13:24:05 2017 (r320535) @@ -171,8 +171,61 @@ typedef struct CXVersion { */ int Subminor; } CXVersion; - + /** + * \brief Describes the exception specification of a cursor. + * + * A negative value indicates that the cursor is not a function declaration. + */ +enum CXCursor_ExceptionSpecificationKind { + + /** + * \brief The cursor has no exception specification. + */ + CXCursor_ExceptionSpecificationKind_None, + + /** + * \brief The cursor has exception specification throw() + */ + CXCursor_ExceptionSpecificationKind_DynamicNone, + + /** + * \brief The cursor has exception specification throw(T1, T2) + */ + CXCursor_ExceptionSpecificationKind_Dynamic, + + /** + * \brief The cursor has exception specification throw(...). + */ + CXCursor_ExceptionSpecificationKind_MSAny, + + /** + * \brief The cursor has exception specification basic noexcept. + */ + CXCursor_ExceptionSpecificationKind_BasicNoexcept, + + /** + * \brief The cursor has exception specification computed noexcept. + */ + CXCursor_ExceptionSpecificationKind_ComputedNoexcept, + + /** + * \brief The exception specification has not yet been evaluated. + */ + CXCursor_ExceptionSpecificationKind_Unevaluated, + + /** + * \brief The exception specification has not yet been instantiated. + */ + CXCursor_ExceptionSpecificationKind_Uninstantiated, + + /** + * \brief The exception specification has not been parsed yet. + */ + CXCursor_ExceptionSpecificationKind_Unparsed +}; + +/** * \brief Provides a shared context for creating translation units. * * It provides two options: @@ -3471,6 +3524,13 @@ CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTyp CINDEX_LINKAGE CXType clang_getResultType(CXType T); /** + * \brief Retrieve the exception specification type associated with a function type. + * + * If a non-function type is passed in, an error code of -1 is returned. + */ +CINDEX_LINKAGE int clang_getExceptionSpecificationType(CXType T); + +/** * \brief Retrieve the number of non-variadic parameters associated with a * function type. * @@ -3497,6 +3557,13 @@ CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic(C * This only returns a valid type if the cursor refers to a function or method. */ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C); + +/** + * \brief Retrieve the exception specification type associated with a given cursor. + * + * This only returns a valid result if the cursor refers to a function or method. + */ +CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C); /** * \brief Return 1 if the CXType is a POD (plain old data) type, and 0 Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Sat Jul 1 13:24:05 2017 (r320535) @@ -2050,6 +2050,11 @@ class ASTContext : public RefCountedBase { /// Get the offset of a FieldDecl or IndirectFieldDecl, in bits. uint64_t getFieldOffset(const ValueDecl *FD) const; + /// Get the offset of an ObjCIvarDecl in bits. + uint64_t lookupFieldBitOffset(const ObjCInterfaceDecl *OID, + const ObjCImplementationDecl *ID, + const ObjCIvarDecl *Ivar) const; + bool isNearlyEmpty(const CXXRecordDecl *RD) const; VTableContextBase *getVTableContext(); Modified: vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h Sat Jul 1 13:24:05 2017 (r320535) @@ -62,9 +62,11 @@ struct StructuralEquivalenceContext { StructuralEquivalenceContext( ASTContext &FromCtx, ASTContext &ToCtx, llvm::DenseSet> &NonEquivalentDecls, - bool StrictTypeSpelling = false, bool Complain = true) + bool StrictTypeSpelling = false, bool Complain = true, + bool ErrorOnTagTypeMismatch = false) : FromCtx(FromCtx), ToCtx(ToCtx), NonEquivalentDecls(NonEquivalentDecls), - StrictTypeSpelling(StrictTypeSpelling), Complain(Complain), + StrictTypeSpelling(StrictTypeSpelling), + ErrorOnTagTypeMismatch(ErrorOnTagTypeMismatch), Complain(Complain), LastDiagFromC2(false) {} DiagnosticBuilder Diag1(SourceLocation Loc, unsigned DiagID); Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/Decl.h Sat Jul 1 13:24:05 2017 (r320535) @@ -2019,7 +2019,10 @@ class FunctionDecl : public DeclaratorDecl, public Dec /// These functions have special behavior under C++1y [expr.new]: /// An implementation is allowed to omit a call to a replaceable global /// allocation function. [...] - bool isReplaceableGlobalAllocationFunction() const; + /// + /// If this function is an aligned allocation/deallocation function, return + /// true through IsAligned. + bool isReplaceableGlobalAllocationFunction(bool *IsAligned = nullptr) const; /// Compute the language linkage. LanguageLinkage getLanguageLinkage() const; Modified: vendor/clang/dist/include/clang/AST/NSAPI.h ============================================================================== --- vendor/clang/dist/include/clang/AST/NSAPI.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/NSAPI.h Sat Jul 1 13:24:05 2017 (r320535) @@ -49,7 +49,7 @@ class NSAPI { (public) NSStr_initWithString, NSStr_initWithUTF8String }; - static const unsigned NumNSStringMethods = 5; + static const unsigned NumNSStringMethods = 6; IdentifierInfo *getNSClassId(NSClassIdKindKind K) const; @@ -112,7 +112,7 @@ class NSAPI { (public) NSMutableDict_setObjectForKeyedSubscript, NSMutableDict_setValueForKey }; - static const unsigned NumNSDictionaryMethods = 14; + static const unsigned NumNSDictionaryMethods = 13; /// \brief The Objective-C NSDictionary selectors. Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const; Modified: vendor/clang/dist/include/clang/AST/OpenMPClause.h ============================================================================== --- vendor/clang/dist/include/clang/AST/OpenMPClause.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/OpenMPClause.h Sat Jul 1 13:24:05 2017 (r320535) @@ -20,6 +20,7 @@ #include "clang/AST/Stmt.h" #include "clang/Basic/OpenMPKinds.h" #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/MapVector.h" namespace clang { @@ -3001,7 +3002,7 @@ class OMPMappableExprListClause : public OMPVarListCla // Organize the components by declaration and retrieve the original // expression. Original expressions are always the first component of the // mappable component list. - llvm::DenseMap> + llvm::MapVector> ComponentListMap; { auto CI = ComponentLists.begin(); Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h ============================================================================== --- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Sat Jul 1 13:24:05 2017 (r320535) @@ -593,6 +593,16 @@ bool RecursiveASTVisitor::PostVisitStmt(Stmt #define STMT(CLASS, PARENT) \ case Stmt::CLASS##Class: \ TRY_TO(WalkUpFrom##CLASS(static_cast(S))); break; +#define INITLISTEXPR(CLASS, PARENT) \ + case Stmt::CLASS##Class: \ + { \ + auto ILE = static_cast(S); \ + if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE) \ + TRY_TO(WalkUpFrom##CLASS(Syn)); \ + if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm()) \ + TRY_TO(WalkUpFrom##CLASS(Sem)); \ + break; \ + } #include "clang/AST/StmtNodes.inc" } @@ -2220,13 +2230,15 @@ bool RecursiveASTVisitor::TraverseSynOrSemIni // the syntactic and the semantic form. // // There is no guarantee about which form \p S takes when this method is called. -DEF_TRAVERSE_STMT(InitListExpr, { +template +bool RecursiveASTVisitor::TraverseInitListExpr( + InitListExpr *S, DataRecursionQueue *Queue) { TRY_TO(TraverseSynOrSemInitListExpr( S->isSemanticForm() ? S->getSyntacticForm() : S, Queue)); TRY_TO(TraverseSynOrSemInitListExpr( S->isSemanticForm() ? S : S->getSemanticForm(), Queue)); - ShouldVisitChildren = false; -}) + return true; +} // GenericSelectionExpr is a special case because the types and expressions // are interleaved. We also need to watch out for null types (default Modified: vendor/clang/dist/include/clang/AST/Redeclarable.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Redeclarable.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/AST/Redeclarable.h Sat Jul 1 13:24:05 2017 (r320535) @@ -21,6 +21,60 @@ namespace clang { class ASTContext; +// Some notes on redeclarables: +// +// - Every redeclarable is on a circular linked list. +// +// - Every decl has a pointer to the first element of the chain _and_ a +// DeclLink that may point to one of 3 possible states: +// - the "previous" (temporal) element in the chain +// - the "latest" (temporal) element in the chain +// - the an "uninitialized-latest" value (when newly-constructed) +// +// - The first element is also often called the canonical element. Every +// element has a pointer to it so that "getCanonical" can be fast. +// +// - Most links in the chain point to previous, except the link out of +// the first; it points to latest. +// +// - Elements are called "first", "previous", "latest" or +// "most-recent" when referring to temporal order: order of addition +// to the chain. +// +// - To make matters confusing, the DeclLink type uses the term "next" +// for its pointer-storage internally (thus functions like +// NextIsPrevious). It's easiest to just ignore the implementation of +// DeclLink when making sense of the redeclaration chain. +// +// - There's also a "definition" link for several types of +// redeclarable, where only one definition should exist at any given +// time (and the defn pointer is stored in the decl's "data" which +// is copied to every element on the chain when it's changed). +// +// Here is some ASCII art: +// +// "first" "latest" +// "canonical" "most recent" +// +------------+ first +--------------+ +// | | <--------------------------- | | +// | | | | +// | | | | +// | | +--------------+ | | +// | | first | | | | +// | | <---- | | | | +// | | | | | | +// | @class A | link | @interface A | link | @class A | +// | seen first | <---- | seen second | <---- | seen third | +// | | | | | | +// +------------+ +--------------+ +--------------+ +// | data | defn | data | defn | data | +// | | ----> | | <---- | | +// +------------+ +--------------+ +--------------+ +// | | ^ ^ +// | |defn | | +// | link +-----+ | +// +-->-------------------------------------------+ + /// \brief Provides common interface for the Decls that can be redeclared. template class Redeclarable { Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Sat Jul 1 13:24:05 2017 (r320535) @@ -605,20 +605,27 @@ semantics: for ``T`` and ``U`` to be incompatible. The declaration of ``overloadable`` functions is restricted to function -declarations and definitions. Most importantly, if any function with a given -name is given the ``overloadable`` attribute, then all function declarations -and definitions with that name (and in that scope) must have the -``overloadable`` attribute. This rule even applies to redeclarations of -functions whose original declaration had the ``overloadable`` attribute, e.g., +declarations and definitions. If a function is marked with the ``overloadable`` +attribute, then all declarations and definitions of functions with that name, +except for at most one (see the note below about unmarked overloads), must have +the ``overloadable`` attribute. In addition, redeclarations of a function with +the ``overloadable`` attribute must have the ``overloadable`` attribute, and +redeclarations of a function without the ``overloadable`` attribute must *not* +have the ``overloadable`` attribute. e.g., .. code-block:: c int f(int) __attribute__((overloadable)); float f(float); // error: declaration of "f" must have the "overloadable" attribute + int f(int); // error: redeclaration of "f" must have the "overloadable" attribute int g(int) __attribute__((overloadable)); int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute + int h(int); + int h(int) __attribute__((overloadable)); // error: declaration of "h" must not + // have the "overloadable" attribute + Functions marked ``overloadable`` must have prototypes. Therefore, the following code is ill-formed: @@ -651,7 +658,28 @@ caveats to this use of name mangling: linkage specification, it's name *will* be mangled in the same way as it would in C. -Query for this feature with ``__has_extension(attribute_overloadable)``. +For the purpose of backwards compatibility, at most one function with the same +name as other ``overloadable`` functions may omit the ``overloadable`` +attribute. In this case, the function without the ``overloadable`` attribute +will not have its name mangled. + +For example: + +.. code-block:: c + + // Notes with mangled names assume Itanium mangling. + int f(int); + int f(double) __attribute__((overloadable)); + void foo() { + f(5); // Emits a call to f (not _Z1fi, as it would with an overload that + // was marked with overloadable). + f(1.0); // Emits a call to _Z1fd. + } + +Support for unmarked overloads is not present in some versions of clang. You may +query for it using ``__has_extension(overloadable_unmarked)``. + +Query for this attribute with ``__has_attribute(overloadable)``. }]; } Added: vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def Sat Jul 1 13:24:05 2017 (r320535) @@ -0,0 +1,70 @@ +//===-- BuiltinsNios2.def - Nios2 Builtin function database --------*- C++ -*-==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the Nios2-specific builtin function database. Users of +// this file must define the BUILTIN macro to make use of this information. +// +//===----------------------------------------------------------------------===// + +// The format of this database matches clang/Basic/Builtins.def. + +#if defined(BUILTIN) && !defined(TARGET_BUILTIN) +# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS) +#endif + +// Nios2 R1 builtins: + +//int __builtin_ldbio(volatile const void *); +BUILTIN(__builtin_ldbio, "ivDC*", "") +//int __builtin_ldbuio(volatile const void *); +BUILTIN(__builtin_ldbuio, "ivDC*", "") +//int __builtin_ldhio(volatile const void *); +BUILTIN(__builtin_ldhio, "ivDC*", "") +//int __builtin_ldhuio(volatile const void *); +BUILTIN(__builtin_ldhuio, "ivDC*", "") +//int __builtin_ldwio(volatile const void *); +BUILTIN(__builtin_ldwio, "ivDC*", "") +//int __builtin_ldwuio(int); +BUILTIN(__builtin_ldwuio, "ii", "") +// int __builtin_rdctl(int); +BUILTIN(__builtin_rdctl, "iIi", "") +// void __builtin_wrctl(int, int); +BUILTIN(__builtin_wrctl, "vIii", "") +// int __builtin_rdprs(int, int); +BUILTIN(__builtin_rdprs, "iii", "") +//void __builtin_stbio(volatile void *, int); +BUILTIN(__builtin_stbio, "vvD*i", "") +//void __builtin_sthio(volatile void *, int); +BUILTIN(__builtin_sthio, "vvD*i", "") +//void __builtin_stwio(volatile void *, int); +BUILTIN(__builtin_stwio, "vvD*i", "") +//void __builtin_sync(void); +BUILTIN(__builtin_sync, "v", "") +// void __builtin_flushd(volatile void *); +BUILTIN(__builtin_flushd, "vvD*", "") +// void __builtin_flushda(volatile void *); +BUILTIN(__builtin_flushda, "vvD*", "") + +// Nios2 R2 builtins: + +// int __builtin_wrpie(int); +TARGET_BUILTIN(__builtin_wrpie, "ii", "", "nios2r2mandatory") +// void __builtin_eni(int); +TARGET_BUILTIN(__builtin_eni, "vi", "", "nios2r2mandatory") +// int __builtin_ldex(volatile const void *); +TARGET_BUILTIN(__builtin_ldex, "ivDC*", "", "nios2r2mandatory") +// int __builtin_stex(volatile void *, int); +TARGET_BUILTIN(__builtin_stex, "ivD*i", "", "nios2r2mandatory") +// int __builtin_ldsex(volatile const void *); +TARGET_BUILTIN(__builtin_ldsex, "ivDC*", "", "nios2r2mpx") +// int __builtin_stsex(volatile void *, int); +TARGET_BUILTIN(__builtin_stsex, "ivDC*i", "", "nios2r2mpx") + +#undef BUILTIN +#undef TARGET_BUILTIN Modified: vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def Sat Jul 1 13:24:05 2017 (r320535) @@ -21,4 +21,8 @@ BUILTIN(__builtin_wasm_current_memory, "z", "n") BUILTIN(__builtin_wasm_grow_memory, "zz", "n") +// Exception handling builtins. +BUILTIN(__builtin_wasm_throw, "vUiv*", "r") +BUILTIN(__builtin_wasm_rethrow, "v", "r") + #undef BUILTIN Modified: vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -200,12 +200,17 @@ def note_odr_defined_here : Note<"also defined here">; def err_odr_function_type_inconsistent : Error< "external function %0 declared with incompatible types in different " "translation units (%1 vs. %2)">; -def warn_odr_tag_type_inconsistent : Warning< - "type %0 has incompatible definitions in different translation units">, - InGroup>; +def warn_odr_tag_type_inconsistent + : Warning<"type %0 has incompatible definitions in different translation " + "units">, + InGroup>; +def err_odr_tag_type_inconsistent + : Error<"type %0 has incompatible definitions in different translation " + "units">; def note_odr_tag_kind_here: Note< "%0 is a %select{struct|interface|union|class|enum}1 here">; def note_odr_field : Note<"field %0 has type %1 here">; +def note_odr_field_name : Note<"field has name %0 here">; def note_odr_missing_field : Note<"no corresponding field here">; def note_odr_bit_field : Note<"bit-field %0 with type %1 and length %2 here">; def note_odr_not_bit_field : Note<"field %0 is not a bit-field">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -138,6 +138,9 @@ def err_drv_cc_print_options_failure : Error< def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">; def err_drv_preamble_format : Error< "incorrect format for -preamble-bytes=N,END">; +def err_invalid_ios_deployment_target : Error< + "invalid iOS deployment version '%0', iOS 10 is the maximum deployment " + "target for 32-bit targets">; def err_drv_conflicting_deployment_targets : Error< "conflicting deployment targets, both '%0' and '%1' are present in environment">; def err_arc_unsupported_on_runtime : Error< @@ -195,8 +198,8 @@ def warn_drv_unused_argument : Warning< def warn_drv_empty_joined_argument : Warning< "joined argument expects additional value: '%0'">, InGroup; -def warn_drv_fdiagnostics_show_hotness_requires_pgo : Warning< - "argument '-fdiagnostics-show-hotness' requires profile-guided optimization information">, +def warn_drv_diagnostics_hotness_requires_pgo : Warning< + "argument '%0' requires profile-guided optimization information">, InGroup; def warn_drv_clang_unsupported : Warning< "the clang compiler does not support '%0'">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Sat Jul 1 13:24:05 2017 (r320535) @@ -311,6 +311,7 @@ def : DiagGroup<"nonportable-cfstrings">; def NonVirtualDtor : DiagGroup<"non-virtual-dtor">; def : DiagGroup<"effc++", [NonVirtualDtor]>; def OveralignedType : DiagGroup<"over-aligned">; +def AlignedAllocationUnavailable : DiagGroup<"aligned-allocation-unavailable">; def OldStyleCast : DiagGroup<"old-style-cast">; def : DiagGroup<"old-style-definition">; def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jul 1 13:24:05 2017 (r320535) @@ -3294,13 +3294,15 @@ def warn_iboutletcollection_property_assign : Warning< "IBOutletCollection properties should be copy/strong and not assign">, InGroup; -def err_attribute_overloadable_missing : Error< - "%select{overloaded function|redeclaration of}0 %1 must have the " - "'overloadable' attribute">; +def err_attribute_overloadable_mismatch : Error< + "redeclaration of %0 must %select{not |}1have the 'overloadable' attribute">; def note_attribute_overloadable_prev_overload : Note< - "previous overload of function is here">; + "previous %select{unmarked |}0overload of function is here">; def err_attribute_overloadable_no_prototype : Error< "'overloadable' function %0 must have a prototype">; +def err_attribute_overloadable_multiple_unmarked_overloads : Error< + "at most one overload for a given name may lack the 'overloadable' " + "attribute">; def warn_ns_attribute_wrong_return_type : Warning< "%0 attribute only applies to %select{functions|methods|properties}1 that " "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">, @@ -6405,6 +6407,12 @@ def warn_overaligned_type : Warning< "type %0 requires %1 bytes of alignment and the default allocator only " "guarantees %2 bytes">, InGroup, DefaultIgnore; +def warn_aligned_allocation_unavailable :Warning< + "aligned %select{allocation|deallocation}0 function of type '%1' possibly " + "unavailable on %2">, InGroup, DefaultError; +def note_silence_unligned_allocation_unavailable : Note< + "if you supply your own aligned allocation functions, use " + "-Wno-aligned-allocation-unavailable to silence this diagnostic">; def err_conditional_void_nonvoid : Error< "%select{left|right}1 operand to ? is void, but %select{right|left}1 operand " @@ -8402,7 +8410,7 @@ def warn_opencl_attr_deprecated_ignored : Warning < def err_opencl_variadic_function : Error< "invalid prototype, variadic arguments are not allowed in OpenCL">; def err_opencl_requires_extension : Error< - "use of %select{type |declaration}0%1 requires %2 extension to be enabled">; + "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">; // OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions def err_opencl_builtin_pipe_first_arg : Error< Modified: vendor/clang/dist/include/clang/Basic/LangOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/LangOptions.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/LangOptions.def Sat Jul 1 13:24:05 2017 (r320535) @@ -199,6 +199,7 @@ LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using LANGOPT(SizedDeallocation , 1, 0, "sized deallocation") LANGOPT(AlignedAllocation , 1, 0, "aligned allocation") +LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable") LANGOPT(NewAlignOverride , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'") LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts") BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation") Modified: vendor/clang/dist/include/clang/Basic/OpenMPKinds.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/OpenMPKinds.def Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/OpenMPKinds.def Sat Jul 1 13:24:05 2017 (r320535) @@ -552,6 +552,7 @@ OPENMP_TASKLOOP_CLAUSE(priority) OPENMP_TASKLOOP_CLAUSE(grainsize) OPENMP_TASKLOOP_CLAUSE(nogroup) OPENMP_TASKLOOP_CLAUSE(num_tasks) +OPENMP_TASKLOOP_CLAUSE(reduction) // Clauses allowed for OpenMP directive 'taskloop simd'. OPENMP_TASKLOOP_SIMD_CLAUSE(if) @@ -572,6 +573,7 @@ OPENMP_TASKLOOP_SIMD_CLAUSE(simdlen) OPENMP_TASKLOOP_SIMD_CLAUSE(grainsize) OPENMP_TASKLOOP_SIMD_CLAUSE(nogroup) OPENMP_TASKLOOP_SIMD_CLAUSE(num_tasks) +OPENMP_TASKLOOP_SIMD_CLAUSE(reduction) // Clauses allowed for OpenMP directive 'critical'. OPENMP_CRITICAL_CLAUSE(hint) Modified: vendor/clang/dist/include/clang/Basic/SourceLocation.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceLocation.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/SourceLocation.h Sat Jul 1 13:24:05 2017 (r320535) @@ -262,6 +262,65 @@ class CharSourceRange { (public) bool isInvalid() const { return !isValid(); } }; +/// \brief Represents an unpacked "presumed" location which can be presented +/// to the user. +/// +/// A 'presumed' location can be modified by \#line and GNU line marker +/// directives and is always the expansion point of a normal location. +/// +/// You can get a PresumedLoc from a SourceLocation with SourceManager. +class PresumedLoc { + const char *Filename; + unsigned Line, Col; + SourceLocation IncludeLoc; + +public: + PresumedLoc() : Filename(nullptr) {} + PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL) + : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) {} + + /// \brief Return true if this object is invalid or uninitialized. + /// + /// This occurs when created with invalid source locations or when walking + /// off the top of a \#include stack. + bool isInvalid() const { return Filename == nullptr; } + bool isValid() const { return Filename != nullptr; } + + /// \brief Return the presumed filename of this location. + /// + /// This can be affected by \#line etc. + const char *getFilename() const { + assert(isValid()); + return Filename; + } + + /// \brief Return the presumed line number of this location. + /// + /// This can be affected by \#line etc. + unsigned getLine() const { + assert(isValid()); + return Line; + } + + /// \brief Return the presumed column number of this location. + /// + /// This cannot be affected by \#line, but is packaged here for convenience. + unsigned getColumn() const { + assert(isValid()); + return Col; + } + + /// \brief Return the presumed include location of this location. + /// + /// This can be affected by GNU linemarker directives. + SourceLocation getIncludeLoc() const { + assert(isValid()); + return IncludeLoc; + } +}; + +class FileEntry; + /// \brief A SourceLocation and its associated SourceManager. /// /// This is useful for argument passing to functions that expect both objects. @@ -274,6 +333,12 @@ class FullSourceLoc : public SourceLocation { (public) explicit FullSourceLoc(SourceLocation Loc, const SourceManager &SM) : SourceLocation(Loc), SrcMgr(&SM) {} + bool hasManager() const { + bool hasSrcMgr = SrcMgr != nullptr; + assert(hasSrcMgr == isValid() && "FullSourceLoc has location but no manager"); + return hasSrcMgr; + } + /// \pre This FullSourceLoc has an associated SourceManager. const SourceManager &getManager() const { assert(SrcMgr && "SourceManager is NULL."); @@ -284,6 +349,13 @@ class FullSourceLoc : public SourceLocation { (public) FullSourceLoc getExpansionLoc() const; FullSourceLoc getSpellingLoc() const; + FullSourceLoc getFileLoc() const; + std::pair getImmediateExpansionRange() const; + PresumedLoc getPresumedLoc(bool UseLineDirectives = true) const; + bool isMacroArgExpansion(FullSourceLoc *StartLoc = nullptr) const; + FullSourceLoc getImmediateMacroCallerLoc() const; + std::pair getModuleImportLoc() const; + unsigned getFileOffset() const; unsigned getExpansionLineNumber(bool *Invalid = nullptr) const; unsigned getExpansionColumnNumber(bool *Invalid = nullptr) const; @@ -293,7 +365,13 @@ class FullSourceLoc : public SourceLocation { (public) const char *getCharacterData(bool *Invalid = nullptr) const; + unsigned getLineNumber(bool *Invalid = nullptr) const; + unsigned getColumnNumber(bool *Invalid = nullptr) const; + std::pair getExpansionRange() const; + + const FileEntry *getFileEntry() const; + /// \brief Return a StringRef to the source buffer data for the /// specified FileID. StringRef getBufferData(bool *Invalid = nullptr) const; @@ -345,50 +423,6 @@ class FullSourceLoc : public SourceLocation { (public) }; -/// \brief Represents an unpacked "presumed" location which can be presented -/// to the user. -/// -/// A 'presumed' location can be modified by \#line and GNU line marker -/// directives and is always the expansion point of a normal location. -/// -/// You can get a PresumedLoc from a SourceLocation with SourceManager. -class PresumedLoc { - const char *Filename; - unsigned Line, Col; - SourceLocation IncludeLoc; -public: - PresumedLoc() : Filename(nullptr) {} - PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL) - : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) { - } - - /// \brief Return true if this object is invalid or uninitialized. - /// - /// This occurs when created with invalid source locations or when walking - /// off the top of a \#include stack. - bool isInvalid() const { return Filename == nullptr; } - bool isValid() const { return Filename != nullptr; } - - /// \brief Return the presumed filename of this location. - /// - /// This can be affected by \#line etc. - const char *getFilename() const { assert(isValid()); return Filename; } - - /// \brief Return the presumed line number of this location. - /// - /// This can be affected by \#line etc. - unsigned getLine() const { assert(isValid()); return Line; } - - /// \brief Return the presumed column number of this location. - /// - /// This cannot be affected by \#line, but is packaged here for convenience. - unsigned getColumn() const { assert(isValid()); return Col; } - - /// \brief Return the presumed include location of this location. - /// - /// This can be affected by GNU linemarker directives. - SourceLocation getIncludeLoc() const { assert(isValid()); return IncludeLoc; } -}; } // end namespace clang Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceManager.h Sat Jul 1 13:22:10 2017 (r320534) +++ vendor/clang/dist/include/clang/Basic/SourceManager.h Sat Jul 1 13:24:05 2017 (r320535) @@ -80,9 +80,19 @@ namespace SrcMgr { /// system_header is seen or in various other cases. /// enum CharacteristicKind { - C_User, C_System, C_ExternCSystem + C_User, C_System, C_ExternCSystem, C_User_ModuleMap, C_System_ModuleMap }; + /// Determine whether a file / directory characteristic is for system code. + inline bool isSystem(CharacteristicKind CK) { + return CK != C_User && CK != C_User_ModuleMap; + } + + /// Determine whether a file characteristic is for a module map. + inline bool isModuleMap(CharacteristicKind CK) { + return CK == C_User_ModuleMap || CK == C_System_ModuleMap; + } + /// \brief One instance of this struct is kept for every file loaded or used. /// /// This object owns the MemoryBuffer object. @@ -251,13 +261,15 @@ namespace SrcMgr { /// preprocessing of this \#include, including this SLocEntry. /// /// Zero means the preprocessor didn't provide such info for this SLocEntry. - unsigned NumCreatedFIDs; + unsigned NumCreatedFIDs : 31; - /// \brief Contains the ContentCache* and the bits indicating the - /// characteristic of the file and whether it has \#line info, all - /// bitmangled together. - uintptr_t Data; + /// \brief Whether this FileInfo has any \#line directives. + unsigned HasLineDirectives : 1; + /// \brief The content cache and the characteristic of the file. + llvm::PointerIntPair + ContentAndKind; + friend class clang::SourceManager; friend class clang::ASTWriter; friend class clang::ASTReader; @@ -269,10 +281,9 @@ namespace SrcMgr { FileInfo X; X.IncludeLoc = IL.getRawEncoding(); X.NumCreatedFIDs = 0; - X.Data = (uintptr_t)Con; - assert((X.Data & 7) == 0 &&"ContentCache pointer insufficiently aligned"); - assert((unsigned)FileCharacter < 4 && "invalid file character"); - X.Data |= (unsigned)FileCharacter; + X.HasLineDirectives = false; + X.ContentAndKind.setPointer(Con); + X.ContentAndKind.setInt(FileCharacter); return X; } @@ -280,22 +291,22 @@ namespace SrcMgr { return SourceLocation::getFromRawEncoding(IncludeLoc); } - const ContentCache* getContentCache() const { - return reinterpret_cast(Data & ~uintptr_t(7)); + const ContentCache *getContentCache() const { + return ContentAndKind.getPointer(); } /// \brief Return whether this is a system header or not. CharacteristicKind getFileCharacteristic() const { - return (CharacteristicKind)(Data & 3); + return ContentAndKind.getInt(); } /// \brief Return true if this FileID has \#line directives in it. - bool hasLineDirectives() const { return (Data & 4) != 0; } + bool hasLineDirectives() const { return HasLineDirectives; } /// \brief Set the flag that indicates that this FileID has /// line table entries associated with it. void setHasLineDirectives() { - Data |= 4; + HasLineDirectives = true; } }; @@ -407,6 +418,8 @@ namespace SrcMgr { }; public: + SLocEntry() : Offset(), IsExpansion(), File() {} + unsigned getOffset() const { return Offset; } bool isExpansion() const { return IsExpansion; } @@ -789,9 +802,8 @@ class SourceManager : public RefCountedBase Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE6F2D89722; Sat, 1 Jul 2017 13:24:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72B21AE6; Sat, 1 Jul 2017 13:24:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOCk7022148; Sat, 1 Jul 2017 13:24:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOCdx022147; Sat, 1 Jul 2017 13:24:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOCdx022147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320536 - vendor/clang/clang-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-trunk-r306956 X-SVN-Commit-Revision: 320536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:13 -0000 Author: dim Date: Sat Jul 1 13:24:12 2017 New Revision: 320536 URL: https://svnweb.freebsd.org/changeset/base/320536 Log: Tag clang trunk r306956. Added: vendor/clang/clang-trunk-r306956/ - copied from r320535, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:19 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2846BD8978E; Sat, 1 Jul 2017 13:24:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6059B2A; Sat, 1 Jul 2017 13:24:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOHND022216; Sat, 1 Jul 2017 13:24:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOFvd022195; Sat, 1 Jul 2017 13:24:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOFvd022195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320537 - in vendor/compiler-rt/dist: lib lib/asan lib/lsan lib/msan lib/msan/tests lib/profile lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/tsan/rtl lib/tsan/tests lib... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/compiler-rt/dist: lib lib/asan lib/lsan lib/msan lib/msan/tests lib/profile lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib/tsan/rtl lib/tsan/tests lib/xray test test/asan/Test... X-SVN-Commit-Revision: 320537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:19 -0000 Author: dim Date: Sat Jul 1 13:24:15 2017 New Revision: 320537 URL: https://svnweb.freebsd.org/changeset/base/320537 Log: Vendor import of compiler-rt trunk r306956: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306956 Added: vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c (contents, props changed) vendor/compiler-rt/dist/lib/xray/xray_always_instrument.txt (contents, props changed) vendor/compiler-rt/dist/lib/xray/xray_never_instrument.txt (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/nil-return-struct.mm vendor/compiler-rt/dist/test/lsan/TestCases/allocator_returns_null.cc (contents, props changed) vendor/compiler-rt/dist/test/xray/TestCases/Linux/always-never-instrument.cc (contents, props changed) Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/profile/CMakeLists.txt vendor/compiler-rt/dist/lib/profile/InstrProfiling.c vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_local_cache.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary64.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h vendor/compiler-rt/dist/lib/scudo/scudo_allocator_combined.h vendor/compiler-rt/dist/lib/scudo/scudo_new_delete.cpp vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_new_delete.cc vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/test/CMakeLists.txt vendor/compiler-rt/dist/test/asan/TestCases/Darwin/asan_gen_prefixes.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/allocator_oom_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-3.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/init_fini_sections.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/textdomain.c vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-sigbus.cpp vendor/compiler-rt/dist/test/asan/TestCases/allocator_returns_null.cc vendor/compiler-rt/dist/test/asan/TestCases/malloc-no-intercept.c vendor/compiler-rt/dist/test/asan/TestCases/throw_call_test.cc vendor/compiler-rt/dist/test/asan/android_commands/android_common.py vendor/compiler-rt/dist/test/builtins/Unit/fp_test.h vendor/compiler-rt/dist/test/cfi/sibling.cpp vendor/compiler-rt/dist/test/msan/allocator_returns_null.cc vendor/compiler-rt/dist/test/profile/instrprof-override-filename.c vendor/compiler-rt/dist/test/scudo/memalign.cpp vendor/compiler-rt/dist/test/scudo/sizes.cpp vendor/compiler-rt/dist/test/tsan/allocator_returns_null.cc Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/CMakeLists.txt Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/CMakeLists.txt Sat Jul 1 13:24:15 2017 (r320537) @@ -21,21 +21,12 @@ function(compiler_rt_build_runtime runtime) string(TOUPPER ${runtime} runtime_uppercase) if(COMPILER_RT_HAS_${runtime_uppercase}) add_subdirectory(${runtime}) - foreach(directory ${ARGN}) - add_subdirectory(${directory}) - endforeach() + if(${runtime} STREQUAL tsan) + add_subdirectory(tsan/dd) + endif() endif() endfunction() -function(compiler_rt_build_sanitizer sanitizer) - string(TOUPPER ${sanitizer} sanitizer_uppercase) - string(TOLOWER ${sanitizer} sanitizer_lowercase) - list(FIND COMPILER_RT_SANITIZERS_TO_BUILD ${sanitizer_lowercase} result) - if(NOT ${result} EQUAL -1) - compiler_rt_build_runtime(${sanitizer} ${ARGN}) - endif() -endfunction() - if(COMPILER_RT_BUILD_SANITIZERS) compiler_rt_build_runtime(interception) @@ -45,14 +36,9 @@ if(COMPILER_RT_BUILD_SANITIZERS) add_subdirectory(ubsan) endif() - compiler_rt_build_sanitizer(asan) - compiler_rt_build_sanitizer(dfsan) - compiler_rt_build_sanitizer(msan) - compiler_rt_build_sanitizer(tsan tsan/dd) - compiler_rt_build_sanitizer(safestack) - compiler_rt_build_sanitizer(cfi) - compiler_rt_build_sanitizer(esan) - compiler_rt_build_sanitizer(scudo) + foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) + compiler_rt_build_runtime(${sanitizer}) + endforeach() compiler_rt_build_runtime(profile) endif() Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -160,7 +160,11 @@ struct QuarantineCallback { } void *Allocate(uptr size) { - return get_allocator().Allocate(cache_, size, 1); + void *res = get_allocator().Allocate(cache_, size, 1); + // TODO(alekseys): Consider making quarantine OOM-friendly. + if (UNLIKELY(!res)) + return DieOnFailure::OnOOM(); + return res; } void Deallocate(void *p) { @@ -524,8 +528,7 @@ struct Allocator { // Expects the chunk to already be marked as quarantined by using // AtomicallySetQuarantineFlagIfAllocated. - void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack, - AllocType alloc_type) { + void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack) { CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); CHECK_GE(m->alloc_tid, 0); if (SANITIZER_WORDSIZE == 64) // On 32-bits this resides in user area. @@ -603,7 +606,7 @@ struct Allocator { ReportNewDeleteSizeMismatch(p, delete_size, stack); } - QuarantineChunk(m, ptr, stack, alloc_type); + QuarantineChunk(m, ptr, stack); } void *Reallocate(void *old_ptr, uptr new_size, BufferedStackTrace *stack) { @@ -632,7 +635,7 @@ struct Allocator { } void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) { - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) + if (CheckForCallocOverflow(size, nmemb)) return AsanAllocator::FailureHandler::OnBadRequest(); void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false); // If the memory comes from the secondary allocator no need to clear it Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -579,17 +579,6 @@ INTERCEPTOR(char*, __strdup, const char *s) { } #endif // ASAN_INTERCEPT___STRDUP -INTERCEPTOR(SIZE_T, wcslen, const wchar_t *s) { - void *ctx; - ASAN_INTERCEPTOR_ENTER(ctx, wcslen); - SIZE_T length = internal_wcslen(s); - if (!asan_init_is_running) { - ENSURE_ASAN_INITED(); - ASAN_READ_RANGE(ctx, s, (length + 1) * sizeof(wchar_t)); - } - return length; -} - INTERCEPTOR(char*, strncpy, char *to, const char *from, uptr size) { void *ctx; ASAN_INTERCEPTOR_ENTER(ctx, strncpy); @@ -722,7 +711,6 @@ void InitializeAsanInterceptors() { // Intercept str* functions. ASAN_INTERCEPT_FUNC(strcat); // NOLINT ASAN_INTERCEPT_FUNC(strcpy); // NOLINT - ASAN_INTERCEPT_FUNC(wcslen); ASAN_INTERCEPT_FUNC(strncat); ASAN_INTERCEPT_FUNC(strncpy); ASAN_INTERCEPT_FUNC(strdup); Modified: vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -25,23 +25,27 @@ // dllexport would normally do. We need to export them in order to make the // VS2015 dynamic CRT (MD) work. #if SANITIZER_WINDOWS -# define CXX_OPERATOR_ATTRIBUTE -# ifdef _WIN64 -# pragma comment(linker, "/export:??2@YAPEAX_K@Z") // operator new -# pragma comment(linker, "/export:??3@YAXPEAX@Z") // operator delete -# pragma comment(linker, "/export:??3@YAXPEAX_K@Z") // sized operator delete -# pragma comment(linker, "/export:??_U@YAPEAX_K@Z") // operator new[] -# pragma comment(linker, "/export:??_V@YAXPEAX@Z") // operator delete[] -# else -# pragma comment(linker, "/export:??2@YAPAXI@Z") // operator new -# pragma comment(linker, "/export:??3@YAXPAX@Z") // operator delete -# pragma comment(linker, "/export:??3@YAXPAXI@Z") // sized operator delete -# pragma comment(linker, "/export:??_U@YAPAXI@Z") // operator new[] -# pragma comment(linker, "/export:??_V@YAXPAX@Z") // operator delete[] -# endif +#define CXX_OPERATOR_ATTRIBUTE +#define COMMENT_EXPORT(sym) __pragma(comment(linker, "/export:"##sym)) +#ifdef _WIN64 +COMMENT_EXPORT("??2@YAPEAX_K@Z") // operator new +COMMENT_EXPORT("??2@YAPEAX_KAEBUnothrow_t@std@@@Z") // operator new nothrow +COMMENT_EXPORT("??3@YAXPEAX@Z") // operator delete +COMMENT_EXPORT("??3@YAXPEAX_K@Z") // sized operator delete +COMMENT_EXPORT("??_U@YAPEAX_K@Z") // operator new[] +COMMENT_EXPORT("??_V@YAXPEAX@Z") // operator delete[] #else -# define CXX_OPERATOR_ATTRIBUTE INTERCEPTOR_ATTRIBUTE +COMMENT_EXPORT("??2@YAPAXI@Z") // operator new +COMMENT_EXPORT("??2@YAPAXIABUnothrow_t@std@@@Z") // operator new nothrow +COMMENT_EXPORT("??3@YAXPAX@Z") // operator delete +COMMENT_EXPORT("??3@YAXPAXI@Z") // sized operator delete +COMMENT_EXPORT("??_U@YAPAXI@Z") // operator new[] +COMMENT_EXPORT("??_V@YAXPAX@Z") // operator delete[] #endif +#undef COMMENT_EXPORT +#else +#define CXX_OPERATOR_ATTRIBUTE INTERCEPTOR_ATTRIBUTE +#endif using namespace __asan; // NOLINT @@ -63,12 +67,17 @@ struct nothrow_t {}; enum class align_val_t: size_t {}; } // namespace std -#define OPERATOR_NEW_BODY(type) \ +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(type, nothrow) \ GET_STACK_TRACE_MALLOC;\ - return asan_memalign(0, size, &stack, type); -#define OPERATOR_NEW_BODY_ALIGN(type) \ + void *res = asan_memalign(0, size, &stack, type);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; +#define OPERATOR_NEW_BODY_ALIGN(type, nothrow) \ GET_STACK_TRACE_MALLOC;\ - return asan_memalign((uptr)align, size, &stack, type); + void *res = asan_memalign((uptr)align, size, &stack, type);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; // On OS X it's not enough to just provide our own 'operator new' and // 'operator delete' implementations, because they're going to be in the @@ -79,40 +88,42 @@ enum class align_val_t: size_t {}; // OS X we need to intercept them using their mangled names. #if !SANITIZER_MAC CXX_OPERATOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY(FROM_NEW); } +void *operator new(size_t size) +{ OPERATOR_NEW_BODY(FROM_NEW, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY(FROM_NEW_BR); } +void *operator new[](size_t size) +{ OPERATOR_NEW_BODY(FROM_NEW_BR, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::nothrow_t const&) -{ OPERATOR_NEW_BODY(FROM_NEW); } +{ OPERATOR_NEW_BODY(FROM_NEW, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::nothrow_t const&) -{ OPERATOR_NEW_BODY(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY(FROM_NEW_BR, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::align_val_t align) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::align_val_t align) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR, false /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new(size_t size, std::align_val_t align, std::nothrow_t const&) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW, true /*nothrow*/); } CXX_OPERATOR_ATTRIBUTE void *operator new[](size_t size, std::align_val_t align, std::nothrow_t const&) -{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR); } +{ OPERATOR_NEW_BODY_ALIGN(FROM_NEW_BR, true /*nothrow*/); } #else // SANITIZER_MAC INTERCEPTOR(void *, _Znwm, size_t size) { - OPERATOR_NEW_BODY(FROM_NEW); + OPERATOR_NEW_BODY(FROM_NEW, false /*nothrow*/); } INTERCEPTOR(void *, _Znam, size_t size) { - OPERATOR_NEW_BODY(FROM_NEW_BR); + OPERATOR_NEW_BODY(FROM_NEW_BR, false /*nothrow*/); } INTERCEPTOR(void *, _ZnwmRKSt9nothrow_t, size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(FROM_NEW); + OPERATOR_NEW_BODY(FROM_NEW, true /*nothrow*/); } INTERCEPTOR(void *, _ZnamRKSt9nothrow_t, size_t size, std::nothrow_t const&) { - OPERATOR_NEW_BODY(FROM_NEW_BR); + OPERATOR_NEW_BODY(FROM_NEW_BR, true /*nothrow*/); } #endif Modified: vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -85,6 +85,7 @@ INTERCEPT_LIBRARY_FUNCTION(strstr); INTERCEPT_LIBRARY_FUNCTION(strtok); INTERCEPT_LIBRARY_FUNCTION(strtol); INTERCEPT_LIBRARY_FUNCTION(wcslen); +INTERCEPT_LIBRARY_FUNCTION(wcsnlen); #ifdef _WIN64 INTERCEPT_LIBRARY_FUNCTION(__C_specific_handler); Modified: vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -74,7 +74,7 @@ void *Allocate(const StackTrace &stack, uptr size, upt size = 1; if (size > kMaxAllowedMallocSize) { Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", size); - return nullptr; + return Allocator::FailureHandler::OnBadRequest(); } void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); // Do not rely on the allocator to clear the memory (it's slow). @@ -99,7 +99,7 @@ void *Reallocate(const StackTrace &stack, void *p, upt if (new_size > kMaxAllowedMallocSize) { Report("WARNING: LeakSanitizer failed to allocate %zu bytes\n", new_size); allocator.Deallocate(GetAllocatorCache(), p); - return nullptr; + return Allocator::FailureHandler::OnBadRequest(); } p = allocator.Reallocate(GetAllocatorCache(), p, new_size, alignment); RegisterAllocation(stack, p, new_size); @@ -134,6 +134,8 @@ void *lsan_realloc(void *p, uptr size, const StackTrac } void *lsan_calloc(uptr nmemb, uptr size, const StackTrace &stack) { + if (CheckForCallocOverflow(size, nmemb)) + return Allocator::FailureHandler::OnBadRequest(); size *= nmemb; return Allocate(stack, size, 1, true); } Modified: vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -70,7 +70,6 @@ INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { CHECK(allocated < kCallocPoolSize); return mem; } - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return nullptr; ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; return lsan_calloc(nmemb, size, stack); @@ -199,34 +198,70 @@ INTERCEPTOR(int, mprobe, void *ptr) { } #endif // SANITIZER_INTERCEPT_MCHECK_MPROBE -#define OPERATOR_NEW_BODY \ - ENSURE_LSAN_INITED; \ - GET_STACK_TRACE_MALLOC; \ - return Allocate(stack, size, 1, kAlwaysClearMemory); -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } -INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(nothrow) \ + ENSURE_LSAN_INITED; \ + GET_STACK_TRACE_MALLOC; \ + void *res = Allocate(stack, size, 1, kAlwaysClearMemory);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res; #define OPERATOR_DELETE_BODY \ ENSURE_LSAN_INITED; \ Deallocate(ptr); +// On OS X it's not enough to just provide our own 'operator new' and +// 'operator delete' implementations, because they're going to be in the runtime +// dylib, and the main executable will depend on both the runtime dylib and +// libstdc++, each of has its implementation of new and delete. +// To make sure that C++ allocation/deallocation operators are overridden on +// OS X we need to intercept them using their mangled names. +#if !SANITIZER_MAC + INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new(size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } +INTERCEPTOR_ATTRIBUTE +void *operator new[](size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } + +INTERCEPTOR_ATTRIBUTE void operator delete(void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE void operator delete[](void *ptr) NOEXCEPT { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE void operator delete(void *ptr, std::nothrow_t const&) { OPERATOR_DELETE_BODY; } INTERCEPTOR_ATTRIBUTE -void operator delete[](void *ptr, std::nothrow_t const &) { - OPERATOR_DELETE_BODY; -} +void operator delete[](void *ptr, std::nothrow_t const &) +{ OPERATOR_DELETE_BODY; } + +#else // SANITIZER_MAC + +INTERCEPTOR(void *, _Znwm, size_t size) +{ OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR(void *, _Znam, size_t size) +{ OPERATOR_NEW_BODY(false /*nothrow*/); } +INTERCEPTOR(void *, _ZnwmRKSt9nothrow_t, size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } +INTERCEPTOR(void *, _ZnamRKSt9nothrow_t, size_t size, std::nothrow_t const&) +{ OPERATOR_NEW_BODY(true /*nothrow*/); } + +INTERCEPTOR(void, _ZdlPv, void *ptr) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdaPv, void *ptr) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdlPvRKSt9nothrow_t, void *ptr, std::nothrow_t const&) +{ OPERATOR_DELETE_BODY; } +INTERCEPTOR(void, _ZdaPvRKSt9nothrow_t, void *ptr, std::nothrow_t const&) +{ OPERATOR_DELETE_BODY; } + +#endif // !SANITIZER_MAC + ///// Thread initialization and finalization. ///// Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -195,7 +195,7 @@ void MsanDeallocate(StackTrace *stack, void *p) { } void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { - if (CallocShouldReturnNullDueToOverflow(size, nmemb)) + if (CheckForCallocOverflow(size, nmemb)) return Allocator::FailureHandler::OnBadRequest(); return MsanReallocate(stack, nullptr, nmemb * size, sizeof(u64), true); } Modified: vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -538,49 +538,6 @@ INTERCEPTOR(int, mbrtowc, wchar_t *dest, const char *s return res; } -INTERCEPTOR(SIZE_T, wcslen, const wchar_t *s) { - ENSURE_MSAN_INITED(); - SIZE_T res = REAL(wcslen)(s); - CHECK_UNPOISONED(s, sizeof(wchar_t) * (res + 1)); - return res; -} - -INTERCEPTOR(SIZE_T, wcsnlen, const wchar_t *s, SIZE_T n) { - ENSURE_MSAN_INITED(); - SIZE_T res = REAL(wcsnlen)(s, n); - CHECK_UNPOISONED(s, sizeof(wchar_t) * Min(res + 1, n)); - return res; -} - -// wchar_t *wcschr(const wchar_t *wcs, wchar_t wc); -INTERCEPTOR(wchar_t *, wcschr, void *s, wchar_t wc, void *ps) { - ENSURE_MSAN_INITED(); - wchar_t *res = REAL(wcschr)(s, wc, ps); - return res; -} - -// wchar_t *wcscpy(wchar_t *dest, const wchar_t *src); -INTERCEPTOR(wchar_t *, wcscpy, wchar_t *dest, const wchar_t *src) { - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - wchar_t *res = REAL(wcscpy)(dest, src); - CopyShadowAndOrigin(dest, src, sizeof(wchar_t) * (REAL(wcslen)(src) + 1), - &stack); - return res; -} - -INTERCEPTOR(wchar_t *, wcsncpy, wchar_t *dest, const wchar_t *src, - SIZE_T n) { // NOLINT - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - SIZE_T copy_size = REAL(wcsnlen)(src, n); - if (copy_size < n) copy_size++; // trailing \0 - wchar_t *res = REAL(wcsncpy)(dest, src, n); // NOLINT - CopyShadowAndOrigin(dest, src, copy_size * sizeof(wchar_t), &stack); - __msan_unpoison(dest + copy_size, (n - copy_size) * sizeof(wchar_t)); - return res; -} - // wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, SIZE_T n); INTERCEPTOR(wchar_t *, wmemcpy, wchar_t *dest, const wchar_t *src, SIZE_T n) { ENSURE_MSAN_INITED(); @@ -1344,11 +1301,11 @@ int OnExit() { return __msan_memcpy(to, from, size); \ } -#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ - do { \ - GET_STORE_STACK_TRACE; \ - CopyShadowAndOrigin(to, from, size, &stack); \ - __msan_unpoison(to + size, 1); \ +#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ + do { \ + GET_STORE_STACK_TRACE; \ + CopyShadowAndOrigin(to, from, size, &stack); \ + __msan_unpoison(to + size, 1); \ } while (false) #include "sanitizer_common/sanitizer_platform_interceptors.h" @@ -1421,6 +1378,35 @@ INTERCEPTOR(int, dl_iterate_phdr, dl_iterate_phdr_cb c cbdata.callback = callback; cbdata.data = data; int res = REAL(dl_iterate_phdr)(msan_dl_iterate_phdr_cb, (void *)&cbdata); + return res; +} + +// wchar_t *wcschr(const wchar_t *wcs, wchar_t wc); +INTERCEPTOR(wchar_t *, wcschr, void *s, wchar_t wc, void *ps) { + ENSURE_MSAN_INITED(); + wchar_t *res = REAL(wcschr)(s, wc, ps); + return res; +} + +// wchar_t *wcscpy(wchar_t *dest, const wchar_t *src); +INTERCEPTOR(wchar_t *, wcscpy, wchar_t *dest, const wchar_t *src) { + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + wchar_t *res = REAL(wcscpy)(dest, src); + CopyShadowAndOrigin(dest, src, sizeof(wchar_t) * (REAL(wcslen)(src) + 1), + &stack); + return res; +} + +INTERCEPTOR(wchar_t *, wcsncpy, wchar_t *dest, const wchar_t *src, + SIZE_T n) { // NOLINT + ENSURE_MSAN_INITED(); + GET_STORE_STACK_TRACE; + SIZE_T copy_size = REAL(wcsnlen)(src, n); + if (copy_size < n) copy_size++; // trailing \0 + wchar_t *res = REAL(wcsncpy)(dest, src, n); // NOLINT + CopyShadowAndOrigin(dest, src, copy_size * sizeof(wchar_t), &stack); + __msan_unpoison(dest + copy_size, (n - copy_size) * sizeof(wchar_t)); return res; } Modified: vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -14,6 +14,7 @@ #include "msan.h" #include "interception/interception.h" +#include "sanitizer_common/sanitizer_allocator.h" #if MSAN_REPLACE_OPERATORS_NEW_AND_DELETE @@ -27,18 +28,25 @@ namespace std { } // namespace std -#define OPERATOR_NEW_BODY \ +// TODO(alekseys): throw std::bad_alloc instead of dying on OOM. +#define OPERATOR_NEW_BODY(nothrow) \ GET_MALLOC_STACK_TRACE; \ - return MsanReallocate(&stack, 0, size, sizeof(u64), false) + void *res = MsanReallocate(&stack, 0, size, sizeof(u64), false);\ + if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\ + return res INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size) { OPERATOR_NEW_BODY; } +void *operator new(size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size) { OPERATOR_NEW_BODY; } +void *operator new[](size_t size) { OPERATOR_NEW_BODY(false /*nothrow*/); } INTERCEPTOR_ATTRIBUTE -void *operator new(size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +void *operator new(size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} INTERCEPTOR_ATTRIBUTE -void *operator new[](size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; } +void *operator new[](size_t size, std::nothrow_t const&) { + OPERATOR_NEW_BODY(true /*nothrow*/); +} #define OPERATOR_DELETE_BODY \ GET_MALLOC_STACK_TRACE; \ Modified: vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Sat Jul 1 13:24:15 2017 (r320537) @@ -1707,6 +1707,48 @@ TEST(MemorySanitizer, strncat_overflow) { // NOLINT EXPECT_POISONED(a[7]); } +TEST(MemorySanitizer, wcscat) { + wchar_t a[10]; + wchar_t b[] = L"def"; + wcscpy(a, L"abc"); + + wcscat(a, b); + EXPECT_EQ(6U, wcslen(a)); + EXPECT_POISONED(a[7]); + + a[3] = 0; + __msan_poison(b + 1, sizeof(wchar_t)); + EXPECT_UMR(wcscat(a, b)); + + __msan_unpoison(b + 1, sizeof(wchar_t)); + __msan_poison(a + 2, sizeof(wchar_t)); + EXPECT_UMR(wcscat(a, b)); +} + +TEST(MemorySanitizer, wcsncat) { + wchar_t a[10]; + wchar_t b[] = L"def"; + wcscpy(a, L"abc"); + + wcsncat(a, b, 5); + EXPECT_EQ(6U, wcslen(a)); + EXPECT_POISONED(a[7]); + + a[3] = 0; + __msan_poison(a + 4, sizeof(wchar_t) * 6); + wcsncat(a, b, 2); + EXPECT_EQ(5U, wcslen(a)); + EXPECT_POISONED(a[6]); + + a[3] = 0; + __msan_poison(b + 1, sizeof(wchar_t)); + EXPECT_UMR(wcsncat(a, b, 2)); + + __msan_unpoison(b + 1, sizeof(wchar_t)); + __msan_poison(a + 2, sizeof(wchar_t)); + EXPECT_UMR(wcsncat(a, b, 2)); +} + #define TEST_STRTO_INT(func_name, char_type, str_prefix) \ TEST(MemorySanitizer, func_name) { \ char_type *e; \ Modified: vendor/compiler-rt/dist/lib/profile/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/profile/CMakeLists.txt Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/CMakeLists.txt Sat Jul 1 13:24:15 2017 (r320537) @@ -48,6 +48,7 @@ set(PROFILE_SOURCES InstrProfilingFile.c InstrProfilingMerge.c InstrProfilingMergeFile.c + InstrProfilingNameVar.c InstrProfilingWriter.c InstrProfilingPlatformDarwin.c InstrProfilingPlatformLinux.c Modified: vendor/compiler-rt/dist/lib/profile/InstrProfiling.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfiling.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfiling.c Sat Jul 1 13:24:15 2017 (r320537) @@ -19,8 +19,6 @@ COMPILER_RT_WEAK uint64_t INSTR_PROF_RAW_VERSION_VAR = INSTR_PROF_RAW_VERSION; -COMPILER_RT_WEAK char INSTR_PROF_PROFILE_NAME_VAR[1] = {0}; - COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_magic(void) { return sizeof(void *) == sizeof(uint64_t) ? (INSTR_PROF_RAW_MAGIC_64) : (INSTR_PROF_RAW_MAGIC_32); Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingBuffer.c Sat Jul 1 13:24:15 2017 (r320537) @@ -45,15 +45,24 @@ uint64_t __llvm_profile_get_size_for_buffer_internal( (CountersEnd - CountersBegin) * sizeof(uint64_t) + NamesSize + Padding; } +COMPILER_RT_VISIBILITY +void initBufferWriter(ProfDataWriter *BufferWriter, char *Buffer) { + BufferWriter->Write = lprofBufferWriter; + BufferWriter->WriterCtx = Buffer; +} + COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer(char *Buffer) { - return lprofWriteData(lprofBufferWriter, Buffer, 0); + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, Buffer); + return lprofWriteData(&BufferWriter, 0, 0); } COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer_internal( char *Buffer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd) { - return lprofWriteDataImpl(lprofBufferWriter, Buffer, DataBegin, DataEnd, - CountersBegin, CountersEnd, 0, NamesBegin, - NamesEnd); + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, Buffer); + return lprofWriteDataImpl(&BufferWriter, DataBegin, DataEnd, CountersBegin, + CountersEnd, 0, NamesBegin, NamesEnd, 0); } Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c Sat Jul 1 13:24:15 2017 (r320537) @@ -91,24 +91,39 @@ static const char *getCurFilename(char *FilenameBuf); static unsigned doMerging() { return lprofCurFilename.MergePoolSize; } /* Return 1 if there is an error, otherwise return 0. */ -static uint32_t fileWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, - void **WriterCtx) { +static uint32_t fileWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs, + uint32_t NumIOVecs) { uint32_t I; - FILE *File = (FILE *)*WriterCtx; + FILE *File = (FILE *)This->WriterCtx; for (I = 0; I < NumIOVecs; I++) { - if (fwrite(IOVecs[I].Data, IOVecs[I].ElmSize, IOVecs[I].NumElm, File) != - IOVecs[I].NumElm) - return 1; + if (IOVecs[I].Data) { + if (fwrite(IOVecs[I].Data, IOVecs[I].ElmSize, IOVecs[I].NumElm, File) != + IOVecs[I].NumElm) + return 1; + } else { + if (fseek(File, IOVecs[I].ElmSize * IOVecs[I].NumElm, SEEK_CUR) == -1) + return 1; + } } return 0; } +static void initFileWriter(ProfDataWriter *This, FILE *File) { + This->Write = fileWriter; + This->WriterCtx = File; +} + COMPILER_RT_VISIBILITY ProfBufferIO * lprofCreateBufferIOInternal(void *File, uint32_t BufferSz) { FreeHook = &free; DynamicBufferIOBuffer = (uint8_t *)calloc(BufferSz, 1); VPBufferSize = BufferSz; - return lprofCreateBufferIO(fileWriter, File); + ProfDataWriter *fileWriter = + (ProfDataWriter *)calloc(sizeof(ProfDataWriter), 1); + initFileWriter(fileWriter, File); + ProfBufferIO *IO = lprofCreateBufferIO(fileWriter); + IO->OwnFileWriter = 1; + return IO; } static void setupIOBuffer() { @@ -122,9 +137,10 @@ static void setupIOBuffer() { /* Read profile data in \c ProfileFile and merge with in-memory profile counters. Returns -1 if there is fatal error, otheriwse - 0 is returned. + 0 is returned. Returning 0 does not mean merge is actually + performed. If merge is actually done, *MergeDone is set to 1. */ -static int doProfileMerging(FILE *ProfileFile) { +static int doProfileMerging(FILE *ProfileFile, int *MergeDone) { uint64_t ProfileFileSize; char *ProfileBuffer; @@ -169,6 +185,8 @@ static int doProfileMerging(FILE *ProfileFile) { __llvm_profile_merge_from_buffer(ProfileBuffer, ProfileFileSize); (void)munmap(ProfileBuffer, ProfileFileSize); + *MergeDone = 1; + return 0; } @@ -190,7 +208,7 @@ static void createProfileDir(const char *Filename) { * dumper. With profile merging enabled, each executable as well as any of * its instrumented shared libraries dump profile data into their own data file. */ -static FILE *openFileForMerging(const char *ProfileFileName) { +static FILE *openFileForMerging(const char *ProfileFileName, int *MergeDone) { FILE *ProfileFile; int rc; @@ -199,15 +217,14 @@ static FILE *openFileForMerging(const char *ProfileFil if (!ProfileFile) return NULL; - rc = doProfileMerging(ProfileFile); - if (rc || COMPILER_RT_FTRUNCATE(ProfileFile, 0L) || + rc = doProfileMerging(ProfileFile, MergeDone); + if (rc || (!*MergeDone && COMPILER_RT_FTRUNCATE(ProfileFile, 0L)) || fseek(ProfileFile, 0L, SEEK_SET) == -1) { PROF_ERR("Profile Merging of file %s failed: %s\n", ProfileFileName, strerror(errno)); fclose(ProfileFile); return NULL; } - fseek(ProfileFile, 0L, SEEK_SET); return ProfileFile; } @@ -216,17 +233,20 @@ static int writeFile(const char *OutputName) { int RetVal; FILE *OutputFile; + int MergeDone = 0; if (!doMerging()) OutputFile = fopen(OutputName, "ab"); else - OutputFile = openFileForMerging(OutputName); + OutputFile = openFileForMerging(OutputName, &MergeDone); if (!OutputFile) return -1; FreeHook = &free; setupIOBuffer(); - RetVal = lprofWriteData(fileWriter, OutputFile, lprofGetVPDataReader()); + ProfDataWriter fileWriter; + initFileWriter(&fileWriter, OutputFile); + RetVal = lprofWriteData(&fileWriter, lprofGetVPDataReader(), MergeDone); fclose(OutputFile); return RetVal; Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingInternal.h Sat Jul 1 13:24:15 2017 (r320537) @@ -48,17 +48,21 @@ typedef struct ProfDataIOVec { size_t NumElm; } ProfDataIOVec; -typedef uint32_t (*WriterCallback)(ProfDataIOVec *, uint32_t NumIOVecs, - void **WriterCtx); +struct ProfDataWriter; +typedef uint32_t (*WriterCallback)(struct ProfDataWriter *This, ProfDataIOVec *, + uint32_t NumIOVecs); +typedef struct ProfDataWriter { + WriterCallback Write; + void *WriterCtx; +} ProfDataWriter; + /*! * The data structure for buffered IO of profile data. */ typedef struct ProfBufferIO { - /* File handle. */ - void *File; - /* Low level IO callback. */ - WriterCallback FileWriter; + ProfDataWriter *FileWriter; + uint32_t OwnFileWriter; /* The start of the buffer. */ uint8_t *BufferStart; /* Total size of the buffer. */ @@ -73,7 +77,7 @@ ProfBufferIO *lprofCreateBufferIOInternal(void *File, /*! * This is the interface to create a handle for buffered IO. */ -ProfBufferIO *lprofCreateBufferIO(WriterCallback FileWriter, void *File); +ProfBufferIO *lprofCreateBufferIO(ProfDataWriter *FileWriter); /*! * The interface to destroy the bufferIO handle and reclaim @@ -96,8 +100,9 @@ int lprofBufferIOFlush(ProfBufferIO *BufferIO); /* The low level interface to write data into a buffer. It is used as the * callback by other high level writer methods such as buffered IO writer * and profile data writer. */ -uint32_t lprofBufferWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, - void **WriterCtx); +uint32_t lprofBufferWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs, + uint32_t NumIOVecs); +void initBufferWriter(ProfDataWriter *BufferWriter, char *Buffer); struct ValueProfData; struct ValueProfRecord; @@ -133,15 +138,17 @@ typedef struct VPDataReaderType { uint32_t N); } VPDataReaderType; -int lprofWriteData(WriterCallback Writer, void *WriterCtx, - VPDataReaderType *VPDataReader); -int lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, +/* Write profile data to destinitation. If SkipNameDataWrite is set to 1, + the name data is already in destintation, we just skip over it. */ +int lprofWriteData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, + int SkipNameDataWrite); +int lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, VPDataReaderType *VPDataReader, const char *NamesBegin, - const char *NamesEnd); + const char *NamesEnd, int SkipNameDataWrite); /* Merge value profile data pointed to by SrcValueProfData into * in-memory profile counters pointed by to DstData. */ Added: vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingNameVar.c Sat Jul 1 13:24:15 2017 (r320537) @@ -0,0 +1,18 @@ +//===- InstrProfilingNameVar.c - profile name variable setup --------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "InstrProfiling.h" + +/* char __llvm_profile_filename[1] + * + * The runtime should only provide its own definition of this symbol when the + * user has not specified one. Set this up by moving the runtime's copy of this + * symbol to an object file within the archive. + */ +COMPILER_RT_WEAK char INSTR_PROF_PROFILE_NAME_VAR[1] = {0}; Modified: vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c ============================================================================== --- vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c Sat Jul 1 13:24:12 2017 (r320536) +++ vendor/compiler-rt/dist/lib/profile/InstrProfilingWriter.c Sat Jul 1 13:24:15 2017 (r320537) @@ -31,41 +31,44 @@ COMPILER_RT_VISIBILITY uint32_t VPBufferSize = 0; /* The buffer writer is reponsponsible in keeping writer state * across the call. */ -COMPILER_RT_VISIBILITY uint32_t lprofBufferWriter(ProfDataIOVec *IOVecs, - uint32_t NumIOVecs, - void **WriterCtx) { +COMPILER_RT_VISIBILITY uint32_t lprofBufferWriter(ProfDataWriter *This, + ProfDataIOVec *IOVecs, + uint32_t NumIOVecs) { uint32_t I; - char **Buffer = (char **)WriterCtx; + char **Buffer = (char **)&This->WriterCtx; for (I = 0; I < NumIOVecs; I++) { size_t Length = IOVecs[I].ElmSize * IOVecs[I].NumElm; - memcpy(*Buffer, IOVecs[I].Data, Length); + if (IOVecs[I].Data) + memcpy(*Buffer, IOVecs[I].Data, Length); *Buffer += Length; } return 0; } -static void llvmInitBufferIO(ProfBufferIO *BufferIO, WriterCallback FileWriter, - void *File, uint8_t *Buffer, uint32_t BufferSz) { - BufferIO->File = File; +static void llvmInitBufferIO(ProfBufferIO *BufferIO, ProfDataWriter *FileWriter, + uint8_t *Buffer, uint32_t BufferSz) { BufferIO->FileWriter = FileWriter; + BufferIO->OwnFileWriter = 0; BufferIO->BufferStart = Buffer; BufferIO->BufferSz = BufferSz; BufferIO->CurOffset = 0; } COMPILER_RT_VISIBILITY ProfBufferIO * -lprofCreateBufferIO(WriterCallback FileWriter, void *File) { +lprofCreateBufferIO(ProfDataWriter *FileWriter) { uint8_t *Buffer = DynamicBufferIOBuffer; uint32_t BufferSize = VPBufferSize; if (!Buffer) { Buffer = &BufferIOBuffer[0]; BufferSize = sizeof(BufferIOBuffer); } - llvmInitBufferIO(&TheBufferIO, FileWriter, File, Buffer, BufferSize); + llvmInitBufferIO(&TheBufferIO, FileWriter, Buffer, BufferSize); return &TheBufferIO; } COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) { + if (BufferIO->OwnFileWriter) + FreeHook(BufferIO->FileWriter); if (DynamicBufferIOBuffer) { FreeHook(DynamicBufferIOBuffer); DynamicBufferIOBuffer = 0; @@ -83,13 +86,16 @@ lprofBufferIOWrite(ProfBufferIO *BufferIO, const uint8 /* Special case, bypass the buffer completely. */ ProfDataIOVec IO[] = {{Data, sizeof(uint8_t), Size}}; if (Size > BufferIO->BufferSz) { - if (BufferIO->FileWriter(IO, 1, &BufferIO->File)) + if (BufferIO->FileWriter->Write(BufferIO->FileWriter, IO, 1)) return -1; } else { /* Write the data to buffer */ uint8_t *Buffer = BufferIO->BufferStart + BufferIO->CurOffset; - lprofBufferWriter(IO, 1, (void **)&Buffer); - BufferIO->CurOffset = Buffer - BufferIO->BufferStart; + ProfDataWriter BufferWriter; + initBufferWriter(&BufferWriter, (char *)Buffer); + lprofBufferWriter(&BufferWriter, IO, 1); + BufferIO->CurOffset = + (uint8_t *)BufferWriter.WriterCtx - BufferIO->BufferStart; } return 0; } @@ -98,7 +104,7 @@ COMPILER_RT_VISIBILITY int lprofBufferIOFlush(ProfBuff if (BufferIO->CurOffset) { ProfDataIOVec IO[] = { {BufferIO->BufferStart, sizeof(uint8_t), BufferIO->CurOffset}}; - if (BufferIO->FileWriter(IO, 1, &BufferIO->File)) + if (BufferIO->FileWriter->Write(BufferIO->FileWriter, IO, 1)) return -1; BufferIO->CurOffset = 0; } @@ -201,7 +207,7 @@ static int writeOneValueProfData(ProfBufferIO *BufferI return 0; } -static int writeValueProfData(WriterCallback Writer, void *WriterCtx, +static int writeValueProfData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd) { @@ -211,7 +217,7 @@ static int writeValueProfData(WriterCallback Writer, v if (!VPDataReader) return 0; - BufferIO = lprofCreateBufferIO(Writer, WriterCtx); + BufferIO = lprofCreateBufferIO(Writer); for (DI = DataBegin; DI < DataEnd; DI++) { if (writeOneValueProfData(BufferIO, VPDataReader, DI)) @@ -225,9 +231,9 @@ static int writeValueProfData(WriterCallback Writer, v return 0; } -COMPILER_RT_VISIBILITY int lprofWriteData(WriterCallback Writer, - void *WriterCtx, - VPDataReaderType *VPDataReader) { +COMPILER_RT_VISIBILITY int lprofWriteData(ProfDataWriter *Writer, + VPDataReaderType *VPDataReader, + int SkipNameDataWrite) { /* Match logic in __llvm_profile_write_buffer(). */ const __llvm_profile_data *DataBegin = __llvm_profile_begin_data(); const __llvm_profile_data *DataEnd = __llvm_profile_end_data(); @@ -235,18 +241,17 @@ COMPILER_RT_VISIBILITY int lprofWriteData(WriterCallba const uint64_t *CountersEnd = __llvm_profile_end_counters(); const char *NamesBegin = __llvm_profile_begin_names(); const char *NamesEnd = __llvm_profile_end_names(); - return lprofWriteDataImpl(Writer, WriterCtx, DataBegin, DataEnd, - CountersBegin, CountersEnd, VPDataReader, - NamesBegin, NamesEnd); + return lprofWriteDataImpl(Writer, DataBegin, DataEnd, CountersBegin, + CountersEnd, VPDataReader, NamesBegin, NamesEnd, + SkipNameDataWrite); } COMPILER_RT_VISIBILITY int -lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, - const __llvm_profile_data *DataBegin, +lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, VPDataReaderType *VPDataReader, const char *NamesBegin, - const char *NamesEnd) { + const char *NamesEnd, int SkipNameDataWrite) { /* Calculate size of sections. */ const uint64_t DataSize = __llvm_profile_get_data_size(DataBegin, DataEnd); @@ -268,14 +273,14 @@ lprofWriteDataImpl(WriterCallback Writer, void *Writer #include "InstrProfData.inc" /* Write the data. */ - ProfDataIOVec IOVec[] = {{&Header, sizeof(__llvm_profile_header), 1}, - {DataBegin, sizeof(__llvm_profile_data), DataSize}, - {CountersBegin, sizeof(uint64_t), CountersSize}, - {NamesBegin, sizeof(uint8_t), NamesSize}, - {Zeroes, sizeof(uint8_t), Padding}}; - if (Writer(IOVec, sizeof(IOVec) / sizeof(*IOVec), &WriterCtx)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:23 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F32ED897AB; Sat, 1 Jul 2017 13:24:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4444B9E; Sat, 1 Jul 2017 13:24:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOLdd022262; Sat, 1 Jul 2017 13:24:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOLtk022261; Sat, 1 Jul 2017 13:24:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOLtk022261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320538 - vendor/compiler-rt/compiler-rt-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-trunk-r306956 X-SVN-Commit-Revision: 320538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:23 -0000 Author: dim Date: Sat Jul 1 13:24:21 2017 New Revision: 320538 URL: https://svnweb.freebsd.org/changeset/base/320538 Log: Tag compiler-rt trunk r306956. Added: vendor/compiler-rt/compiler-rt-trunk-r306956/ - copied from r320537, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:39 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB7DD89889; Sat, 1 Jul 2017 13:24:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E171D58; Sat, 1 Jul 2017 13:24:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOcno022321; Sat, 1 Jul 2017 13:24:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DObE1022314; Sat, 1 Jul 2017 13:24:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DObE1022314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320539 - in vendor/libc++/dist: include test/std/language.support/support.dynamic/new.delete/new.delete.placement test/std/utilities/utility/pairs/pair.astuple test/std/utilities/varia... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist: include test/std/language.support/support.dynamic/new.delete/new.delete.placement test/std/utilities/utility/pairs/pair.astuple test/std/utilities/variant/variant.helpers utils/... X-SVN-Commit-Revision: 320539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:39 -0000 Author: dim Date: Sat Jul 1 13:24:37 2017 New Revision: 320539 URL: https://svnweb.freebsd.org/changeset/base/320539 Log: Vendor import of libc++ trunk r306956: https://llvm.org/svn/llvm-project/libcxx/trunk@306956 Added: vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp (contents, props changed) Deleted: vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_deployment.fail.cpp Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/new vendor/libc++/dist/include/string vendor/libc++/dist/utils/libcxx/test/target_info.py vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/__config Sat Jul 1 13:24:37 2017 (r320539) @@ -1176,11 +1176,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) -#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION \ - __attribute__((availability(macosx,strict,introduced=10.13))) \ - __attribute__((availability(ios,strict,introduced=11.0))) \ - __attribute__((availability(tvos,strict,introduced=11.0))) \ - __attribute__((availability(watchos,strict,introduced=4.0))) #else #define _LIBCPP_AVAILABILITY_SHARED_MUTEX #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS @@ -1192,7 +1187,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ #define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE #define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY #define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR -#define _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION #endif // Define availability that depends on _LIBCPP_NO_EXCEPTIONS. Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/new Sat Jul 1 13:24:37 2017 (r320539) @@ -193,20 +193,20 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZE #endif #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; +_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _NOALIAS; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_ALIGNED_ALLOCATION void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; #endif #endif Modified: vendor/libc++/dist/include/string ============================================================================== --- vendor/libc++/dist/include/string Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/include/string Sat Jul 1 13:24:37 2017 (r320539) @@ -4004,6 +4004,10 @@ basic_string<_CharT, _Traits, _Allocator>::__subscript #endif // _LIBCPP_DEBUG_LEVEL >= 2 +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) +_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) +_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&)) + #if _LIBCPP_STD_VER > 11 // Literal suffixes for basic_string [basic.string.literals] inline namespace literals @@ -4036,10 +4040,6 @@ inline namespace literals } } #endif - -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string) -_LIBCPP_EXTERN_TEMPLATE(string operator+, allocator >(char const*, string const&)) _LIBCPP_END_NAMESPACE_STD Added: vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp Sat Jul 1 13:24:37 2017 (r320539) @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template struct pair + +// tuple_element >::type + +#include + +int main() +{ + typedef std::pair T; + typename std::tuple_element<2, T>::type foo; // expected-error@utility:* {{Index out of bounds in std::tuple_element>}} +} Added: vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/utilities/variant/variant.helpers/variant_alternative.fail.cpp Sat Jul 1 13:24:37 2017 (r320539) @@ -0,0 +1,32 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// + +// template struct variant_alternative; // undefined +// template struct variant_alternative; +// template struct variant_alternative; +// template struct variant_alternative; +// template +// using variant_alternative_t = typename variant_alternative::type; +// +// template +// struct variant_alternative>; + +#include +#include +#include + +int main() { + using V = std::variant; + typename std::variant_alternative<4, V>::type foo; // expected-error@variant:* {{Index out of bounds in std::variant_alternative<>}} +} Modified: vendor/libc++/dist/utils/libcxx/test/target_info.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/test/target_info.py Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/utils/libcxx/test/target_info.py Sat Jul 1 13:24:37 2017 (r320539) @@ -8,11 +8,11 @@ #===----------------------------------------------------------------------===// import importlib -import lit.util # pylint: disable=import-error,no-name-in-module import locale import os import platform import re +import subprocess import sys class DefaultTargetInfo(object): @@ -73,12 +73,13 @@ class DarwinLocalTI(DefaultTargetInfo): super(DarwinLocalTI, self).__init__(full_config) def is_host_macosx(self): - name = lit.util.capture(['sw_vers', '-productName']).strip() + name = subprocess.check_output(['sw_vers', '-productName']).strip() return name == "Mac OS X" def get_macosx_version(self): assert self.is_host_macosx() - version = lit.util.capture(['sw_vers', '-productVersion']).strip() + version = subprocess.check_output( + ['sw_vers', '-productVersion']).strip() version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version) return version @@ -86,7 +87,7 @@ class DarwinLocalTI(DefaultTargetInfo): assert self.is_host_macosx() cmd = ['xcrun', '--sdk', name, '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() except OSError: pass @@ -127,7 +128,7 @@ class DarwinLocalTI(DefaultTargetInfo): else: cmd = ['xcrun', '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() res = 0 except OSError: res = -1 Modified: vendor/libc++/dist/www/upcoming_meeting.html ============================================================================== --- vendor/libc++/dist/www/upcoming_meeting.html Sat Jul 1 13:24:21 2017 (r320538) +++ vendor/libc++/dist/www/upcoming_meeting.html Sat Jul 1 13:24:37 2017 (r320539) @@ -90,10 +90,10 @@
  • 2954 - I don't think there's anything to do here.
  • 2961 - We haven't implemented the PMR stuff yet.
  • 2966 - Wording cleanup; no code or test changes needed.
  • -
  • 2974 - I have some code lying around that does this.
  • +
  • 2974 - I did this in r305196. Tests added in 306580
  • -

    Last Updated: 25-Jun-2017

    +

    Last Updated: 28-Jun-2017

    From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:42 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9418CD898A0; Sat, 1 Jul 2017 13:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 426C3D99; Sat, 1 Jul 2017 13:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOf5q022370; Sat, 1 Jul 2017 13:24:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOfLL022369; Sat, 1 Jul 2017 13:24:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOfLL022369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320540 - vendor/libc++/libc++-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-trunk-r306956 X-SVN-Commit-Revision: 320540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:42 -0000 Author: dim Date: Sat Jul 1 13:24:41 2017 New Revision: 320540 URL: https://svnweb.freebsd.org/changeset/base/320540 Log: Tag libc++ trunk r306956. Added: vendor/libc++/libc++-trunk-r306956/ - copied from r320539, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:49 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205B1D8991C; Sat, 1 Jul 2017 13:24:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2430E51; Sat, 1 Jul 2017 13:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOlhM022443; Sat, 1 Jul 2017 13:24:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOjMm022416; Sat, 1 Jul 2017 13:24:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOjMm022416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320541 - in vendor/lld/dist: COFF ELF ELF/Arch lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist: COFF ELF ELF/Arch lib/ReaderWriter/MachO test test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Commit-Revision: 320541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:49 -0000 Author: dim Date: Sat Jul 1 13:24:45 2017 New Revision: 320541 URL: https://svnweb.freebsd.org/changeset/base/320541 Log: Vendor import of lld trunk r306956: https://llvm.org/svn/llvm-project/lld/trunk@306956 Added: vendor/lld/dist/ELF/Arch/SPARCV9.cpp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc vendor/lld/dist/test/COFF/Inputs/combined-resources-2.res (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-cursor.bmp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources-okay.bmp (contents, props changed) vendor/lld/dist/test/COFF/Inputs/combined-resources.rc vendor/lld/dist/test/COFF/Inputs/combined-resources.res (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s (contents, props changed) vendor/lld/dist/test/COFF/Inputs/pdb-import-gc.lib (contents, props changed) vendor/lld/dist/test/COFF/combined-resources.test vendor/lld/dist/test/COFF/pdb-global-gc.yaml vendor/lld/dist/test/COFF/pdb-import-gc.yaml vendor/lld/dist/test/COFF/reloc-discarded.s (contents, props changed) vendor/lld/dist/test/ELF/Inputs/dso-undef-size.s (contents, props changed) vendor/lld/dist/test/ELF/basic-sparcv9.s (contents, props changed) vendor/lld/dist/test/ELF/dso-undef-size.s (contents, props changed) vendor/lld/dist/test/ELF/relocatable-script.s (contents, props changed) vendor/lld/dist/test/ELF/version-script-symver.s (contents, props changed) Modified: vendor/lld/dist/COFF/Chunks.cpp vendor/lld/dist/COFF/Chunks.h vendor/lld/dist/COFF/Driver.h vendor/lld/dist/COFF/MarkLive.cpp vendor/lld/dist/COFF/Symbols.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/CMakeLists.txt vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/SymbolTable.cpp vendor/lld/dist/ELF/SymbolTable.h vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/Symbols.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Target.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/pdb-comdat.test vendor/lld/dist/test/COFF/pdb-safeseh.yaml vendor/lld/dist/test/COFF/pdb-secrel-absolute.yaml vendor/lld/dist/test/COFF/pdb-symbol-types.yaml vendor/lld/dist/test/COFF/resource.test vendor/lld/dist/test/COFF/secrel-absolute.s vendor/lld/dist/test/ELF/arm-exidx-canunwind.s vendor/lld/dist/test/ELF/arm-exidx-gc.s vendor/lld/dist/test/ELF/arm-exidx-shared.s vendor/lld/dist/test/ELF/linkerscript/data-commands-gc.s vendor/lld/dist/test/lit.cfg Modified: vendor/lld/dist/COFF/Chunks.cpp ============================================================================== --- vendor/lld/dist/COFF/Chunks.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Chunks.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -11,6 +11,7 @@ #include "Error.h" #include "InputFiles.h" #include "Symbols.h" +#include "Writer.h" #include "llvm/ADT/Twine.h" #include "llvm/BinaryFormat/COFF.h" #include "llvm/Object/COFF.h" @@ -52,18 +53,27 @@ static void add32(uint8_t *P, int32_t V) { write32le(P static void add64(uint8_t *P, int64_t V) { write64le(P, read64le(P) + V); } static void or16(uint8_t *P, uint16_t V) { write16le(P, read16le(P) | V); } -static void applySecRel(const SectionChunk *Sec, uint8_t *Off, Defined *Sym) { - // Don't apply section relative relocations to absolute symbols in codeview - // debug info sections. MSVC does not treat such relocations as fatal errors, - // and they can be found in the standard library for linker-provided symbols - // like __guard_fids_table and __safe_se_handler_table. - if (!(isa(Sym) && Sec->isCodeView())) - add32(Off, Sym->getSecrel()); +static void applySecRel(const SectionChunk *Sec, uint8_t *Off, + OutputSection *OS, uint64_t S) { + if (!OS) { + if (Sec->isCodeView()) + return; + fatal("SECREL relocation cannot be applied to absolute symbols"); + } + uint64_t SecRel = S - OS->getRVA(); + assert(SecRel < INT32_MAX && "overflow in SECREL relocation"); + add32(Off, SecRel); } -void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +static void applySecIdx(uint8_t *Off, OutputSection *OS) { + // If we have no output section, this must be an absolute symbol. Use the + // sentinel absolute symbol section index. + uint16_t SecIdx = OS ? OS->SectionIndex : DefinedAbsolute::OutputSectionIndex; + add16(Off, SecIdx); +} + +void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { switch (Type) { case IMAGE_REL_AMD64_ADDR32: add32(Off, S + Config->ImageBase); break; case IMAGE_REL_AMD64_ADDR64: add64(Off, S + Config->ImageBase); break; @@ -74,23 +84,22 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t case IMAGE_REL_AMD64_REL32_3: add32(Off, S - P - 7); break; case IMAGE_REL_AMD64_REL32_4: add32(Off, S - P - 8); break; case IMAGE_REL_AMD64_REL32_5: add32(Off, S - P - 9); break; - case IMAGE_REL_AMD64_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_AMD64_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } } -void SectionChunk::applyRelX86(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +void SectionChunk::applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { switch (Type) { case IMAGE_REL_I386_ABSOLUTE: break; case IMAGE_REL_I386_DIR32: add32(Off, S + Config->ImageBase); break; case IMAGE_REL_I386_DIR32NB: add32(Off, S); break; case IMAGE_REL_I386_REL32: add32(Off, S - P - 4); break; - case IMAGE_REL_I386_SECTION: add16(Off, Sym->getSectionIndex()); break; - case IMAGE_REL_I386_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_I386_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_I386_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -137,20 +146,21 @@ static void applyBranch24T(uint8_t *Off, int32_t V) { write16le(Off + 2, (read16le(Off + 2) & 0xd000) | (J1 << 13) | (J2 << 11) | ((V >> 1) & 0x7ff)); } -void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, Defined *Sym, - uint64_t P) const { - uint64_t S = Sym->getRVA(); +void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS, + uint64_t S, uint64_t P) const { // Pointer to thumb code must have the LSB set. - if (Sym->isExecutable()) - S |= 1; + uint64_t SX = S; + if (OS && (OS->getPermissions() & IMAGE_SCN_MEM_EXECUTE)) + SX |= 1; switch (Type) { - case IMAGE_REL_ARM_ADDR32: add32(Off, S + Config->ImageBase); break; - case IMAGE_REL_ARM_ADDR32NB: add32(Off, S); break; - case IMAGE_REL_ARM_MOV32T: applyMOV32T(Off, S + Config->ImageBase); break; - case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break; - case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break; - case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, Sym); break; + case IMAGE_REL_ARM_ADDR32: add32(Off, SX + Config->ImageBase); break; + case IMAGE_REL_ARM_ADDR32NB: add32(Off, SX); break; + case IMAGE_REL_ARM_MOV32T: applyMOV32T(Off, SX + Config->ImageBase); break; + case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, SX - P - 4); break; + case IMAGE_REL_ARM_SECTION: applySecIdx(Off, OS); break; + case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, OS, S); break; default: fatal("unsupported relocation type 0x" + Twine::utohexstr(Type)); } @@ -166,18 +176,39 @@ void SectionChunk::writeTo(uint8_t *Buf) const { // Apply relocations. for (const coff_relocation &Rel : Relocs) { uint8_t *Off = Buf + OutputSectionOff + Rel.VirtualAddress; + + // Get the output section of the symbol for this relocation. The output + // section is needed to compute SECREL and SECTION relocations used in debug + // info. SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex); Defined *Sym = cast(Body); + Chunk *C = Sym->getChunk(); + OutputSection *OS = C ? C->getOutputSection() : nullptr; + + // Only absolute and __ImageBase symbols lack an output section. For any + // other symbol, this indicates that the chunk was discarded. Normally + // relocations against discarded sections are an error. However, debug info + // sections are not GC roots and can end up with these kinds of relocations. + // Skip these relocations. + if (!OS && !isa(Sym) && !isa(Sym)) { + if (isCodeView()) + continue; + fatal("relocation against symbol in discarded section: " + + Sym->getName()); + } + uint64_t S = Sym->getRVA(); + + // Compute the RVA of the relocation for relative relocations. uint64_t P = RVA + Rel.VirtualAddress; switch (Config->Machine) { case AMD64: - applyRelX64(Off, Rel.Type, Sym, P); + applyRelX64(Off, Rel.Type, OS, S, P); break; case I386: - applyRelX86(Off, Rel.Type, Sym, P); + applyRelX86(Off, Rel.Type, OS, S, P); break; case ARMNT: - applyRelARM(Off, Rel.Type, Sym, P); + applyRelARM(Off, Rel.Type, OS, S, P); break; default: llvm_unreachable("unknown machine type"); Modified: vendor/lld/dist/COFF/Chunks.h ============================================================================== --- vendor/lld/dist/COFF/Chunks.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Chunks.h Sat Jul 1 13:24:45 2017 (r320541) @@ -145,9 +145,12 @@ class SectionChunk : public Chunk { (public) StringRef getSectionName() const override { return SectionName; } void getBaserels(std::vector *Res) override; bool isCOMDAT() const; - void applyRelX64(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; - void applyRelX86(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; - void applyRelARM(uint8_t *Off, uint16_t Type, Defined *Sym, uint64_t P) const; + void applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; + void applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; + void applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S, + uint64_t P) const; // Called if the garbage collector decides to not include this chunk // in a final output. It's supposed to print out a log message to stdout. Modified: vendor/lld/dist/COFF/Driver.h ============================================================================== --- vendor/lld/dist/COFF/Driver.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Driver.h Sat Jul 1 13:24:45 2017 (r320541) @@ -34,7 +34,6 @@ extern LinkerDriver *Driver; using llvm::COFF::MachineTypes; using llvm::COFF::WindowsSubsystem; using llvm::Optional; -class InputFile; // Implemented in MarkLive.cpp. void markLive(const std::vector &Chunks); Modified: vendor/lld/dist/COFF/MarkLive.cpp ============================================================================== --- vendor/lld/dist/COFF/MarkLive.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/MarkLive.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -52,6 +52,13 @@ void markLive(const std::vector &Chunks) { while (!Worklist.empty()) { SectionChunk *SC = Worklist.pop_back_val(); + + // If this section was discarded, there are relocations referring to + // discarded sections. Ignore these sections to avoid crashing. They will be + // diagnosed during relocation processing. + if (SC->isDiscarded()) + continue; + assert(SC->isLive() && "We mark as live when pushing onto the worklist!"); // Mark all symbols listed in the relocation table for this section. Modified: vendor/lld/dist/COFF/Symbols.h ============================================================================== --- vendor/lld/dist/COFF/Symbols.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Symbols.h Sat Jul 1 13:24:45 2017 (r320541) @@ -110,17 +110,9 @@ class Defined : public SymbolBody { (public) // writer sets and uses RVAs. uint64_t getRVA(); - // Returns the RVA relative to the beginning of the output section. - // Used to implement SECREL relocation type. - uint32_t getSecrel(); - - // Returns the output section index. - // Used to implement SECTION relocation type. - uint16_t getSectionIndex(); - - // Returns true if this symbol points to an executable (e.g. .text) section. - // Used to implement ARM relocations. - bool isExecutable(); + // Returns the chunk containing this symbol. Absolute symbols and __ImageBase + // do not have chunks, so this may return null. + Chunk *getChunk(); }; // Symbols defined via a COFF object file or bitcode file. For COFF files, this @@ -167,7 +159,6 @@ class DefinedRegular : public DefinedCOFF { (public) bool isCOMDAT() { return IsCOMDAT; } SectionChunk *getChunk() { return *Data; } uint32_t getValue() { return Sym->Value; } - uint32_t getSecrel(); private: SectionChunk **Data; @@ -187,8 +178,7 @@ class DefinedCommon : public DefinedCOFF { (public) } uint64_t getRVA() { return Data->getRVA(); } - uint32_t getSecrel() { return Data->OutputSectionOff; } - uint16_t getSectionIndex(); + Chunk *getChunk() { return Data; } private: friend SymbolTable; @@ -219,6 +209,7 @@ class DefinedAbsolute : public Defined { (public) // against absolute symbols resolve to this 16 bit number, and it is the // largest valid section index plus one. This is written by the Writer. static uint16_t OutputSectionIndex; + uint16_t getSecIdx() { return OutputSectionIndex; } private: uint64_t VA; @@ -237,9 +228,8 @@ class DefinedSynthetic : public Defined { (public) // A null chunk indicates that this is __ImageBase. Otherwise, this is some // other synthesized chunk, like SEHTableChunk. - uint32_t getRVA() const { return C ? C->getRVA() : 0; } - uint32_t getSecrel() const { return C ? C->OutputSectionOff : 0; } - Chunk *getChunk() const { return C; } + uint32_t getRVA() { return C ? C->getRVA() : 0; } + Chunk *getChunk() { return C; } private: Chunk *C; @@ -304,9 +294,11 @@ class DefinedImportData : public Defined { (public) } uint64_t getRVA() { return File->Location->getRVA(); } + Chunk *getChunk() { return File->Location; } + void setLocation(Chunk *AddressTable) { File->Location = AddressTable; } + StringRef getDLLName() { return File->DLLName; } StringRef getExternalName() { return File->ExternalName; } - void setLocation(Chunk *AddressTable) { File->Location = AddressTable; } uint16_t getOrdinal() { return File->Hdr->OrdinalHint; } ImportFile *File; @@ -374,6 +366,29 @@ inline uint64_t Defined::getRVA() { case LazyKind: case UndefinedKind: llvm_unreachable("Cannot get the address for an undefined symbol."); + } + llvm_unreachable("unknown symbol kind"); +} + +inline Chunk *Defined::getChunk() { + switch (kind()) { + case DefinedRegularKind: + return cast(this)->getChunk(); + case DefinedAbsoluteKind: + return nullptr; + case DefinedSyntheticKind: + return cast(this)->getChunk(); + case DefinedImportDataKind: + return cast(this)->getChunk(); + case DefinedImportThunkKind: + return cast(this)->getChunk(); + case DefinedLocalImportKind: + return cast(this)->getChunk(); + case DefinedCommonKind: + return cast(this)->getChunk(); + case LazyKind: + case UndefinedKind: + llvm_unreachable("Cannot get the chunk of an undefined symbol."); } llvm_unreachable("unknown symbol kind"); } Modified: vendor/lld/dist/COFF/Writer.cpp ============================================================================== --- vendor/lld/dist/COFF/Writer.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/COFF/Writer.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -120,7 +120,6 @@ class Writer { (private) void writeSections(); void sortExceptionTable(); void writeBuildId(); - void applyRelocations(); llvm::Optional createSymbol(Defined *D); size_t addEntryToStringTable(StringRef Str); @@ -208,55 +207,6 @@ void OutputSection::writeHeaderTo(uint8_t *Buf) { strncpy(Hdr->Name, Name.data(), std::min(Name.size(), (size_t)COFF::NameSize)); } -} - -uint32_t Defined::getSecrel() { - assert(this); - switch (kind()) { - case DefinedRegularKind: - return cast(this)->getSecrel(); - case DefinedCommonKind: - return cast(this)->getSecrel(); - case DefinedSyntheticKind: - return cast(this)->getSecrel(); - default: - break; - } - fatal("SECREL relocation points to a non-regular symbol: " + toString(*this)); -} - -uint32_t DefinedRegular::getSecrel() { - assert(getChunk()->isLive() && "relocation against discarded section"); - uint64_t Diff = getRVA() - getChunk()->getOutputSection()->getRVA(); - assert(Diff < UINT32_MAX && "section offset too large"); - return (uint32_t)Diff; -} - -uint16_t Defined::getSectionIndex() { - if (auto *D = dyn_cast(this)) - return D->getChunk()->getOutputSection()->SectionIndex; - if (isa(this)) - return DefinedAbsolute::OutputSectionIndex; - if (auto *D = dyn_cast(this)) - return D->getSectionIndex(); - if (auto *D = dyn_cast(this)) { - if (!D->getChunk()) - return 0; - return D->getChunk()->getOutputSection()->SectionIndex; - } - fatal("SECTION relocation points to a non-regular symbol: " + - toString(*this)); -} - -uint16_t DefinedCommon::getSectionIndex() { - return Data->getOutputSection()->SectionIndex; -} - -bool Defined::isExecutable() { - const auto X = IMAGE_SCN_MEM_EXECUTE; - if (auto *D = dyn_cast(this)) - return D->getChunk()->getOutputSection()->getPermissions() & X; - return isa(this); } } // namespace coff Added: vendor/lld/dist/ELF/Arch/SPARCV9.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/ELF/Arch/SPARCV9.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,149 @@ +//===- SPARCV9.cpp --------------------------------------------------------===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "Error.h" +#include "InputFiles.h" +#include "Symbols.h" +#include "SyntheticSections.h" +#include "Target.h" +#include "llvm/Support/Endian.h" + +using namespace llvm; +using namespace llvm::support::endian; +using namespace llvm::ELF; +using namespace lld; +using namespace lld::elf; + +namespace { +class SPARCV9 final : public TargetInfo { +public: + SPARCV9(); + RelExpr getRelExpr(uint32_t Type, const SymbolBody &S, + const uint8_t *Loc) const override; + void writePlt(uint8_t *Buf, uint64_t GotEntryAddr, uint64_t PltEntryAddr, + int32_t Index, unsigned RelOff) const override; + void relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const override; +}; +} // namespace + +SPARCV9::SPARCV9() { + CopyRel = R_SPARC_COPY; + GotRel = R_SPARC_GLOB_DAT; + PltRel = R_SPARC_JMP_SLOT; + RelativeRel = R_SPARC_RELATIVE; + GotEntrySize = 8; + PltEntrySize = 32; + PltHeaderSize = 4 * PltEntrySize; + + PageSize = 8192; + DefaultMaxPageSize = 0x100000; + DefaultImageBase = 0x100000; +} + +RelExpr SPARCV9::getRelExpr(uint32_t Type, const SymbolBody &S, + const uint8_t *Loc) const { + switch (Type) { + case R_SPARC_32: + case R_SPARC_UA32: + case R_SPARC_64: + case R_SPARC_UA64: + return R_ABS; + case R_SPARC_PC10: + case R_SPARC_PC22: + case R_SPARC_DISP32: + case R_SPARC_WDISP30: + return R_PC; + case R_SPARC_GOT10: + return R_GOT_OFF; + case R_SPARC_GOT22: + return R_GOT_OFF; + case R_SPARC_WPLT30: + return R_PLT_PC; + case R_SPARC_NONE: + return R_NONE; + default: + error(toString(S.File) + ": unknown relocation type: " + toString(Type)); + return R_HINT; + } +} + +void SPARCV9::relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const { + switch (Type) { + case R_SPARC_32: + case R_SPARC_UA32: + // V-word32 + checkUInt<32>(Loc, Val, Type); + write32be(Loc, Val); + break; + case R_SPARC_DISP32: + // V-disp32 + checkInt<32>(Loc, Val, Type); + write32be(Loc, Val); + break; + case R_SPARC_WDISP30: + case R_SPARC_WPLT30: + // V-disp30 + checkInt<32>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x3fffffff) | ((Val >> 2) & 0x3fffffff)); + break; + case R_SPARC_22: + // V-imm22 + checkUInt<22>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x003fffff) | (Val & 0x003fffff)); + break; + case R_SPARC_GOT22: + case R_SPARC_PC22: + // T-imm22 + write32be(Loc, (read32be(Loc) & ~0x003fffff) | ((Val >> 10) & 0x003fffff)); + break; + case R_SPARC_WDISP19: + // V-disp19 + checkInt<21>(Loc, Val, Type); + write32be(Loc, (read32be(Loc) & ~0x0007ffff) | ((Val >> 2) & 0x0007ffff)); + break; + case R_SPARC_GOT10: + case R_SPARC_PC10: + // T-simm10 + write32be(Loc, (read32be(Loc) & ~0x000003ff) | (Val & 0x000003ff)); + break; + case R_SPARC_64: + case R_SPARC_UA64: + case R_SPARC_GLOB_DAT: + // V-xword64 + write64be(Loc, Val); + break; + default: + error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + } +} + +void SPARCV9::writePlt(uint8_t *Buf, uint64_t GotEntryAddr, + uint64_t PltEntryAddr, int32_t Index, + unsigned RelOff) const { + const uint8_t PltData[] = { + 0x03, 0x00, 0x00, 0x00, // sethi (. - .PLT0), %g1 + 0x30, 0x68, 0x00, 0x00, // ba,a %xcc, .PLT1 + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00, // nop + 0x01, 0x00, 0x00, 0x00 // nop + }; + memcpy(Buf, PltData, sizeof(PltData)); + + uint64_t Off = PltHeaderSize + Index * PltEntrySize; + relocateOne(Buf, R_SPARC_22, Off); + relocateOne(Buf + 4, R_SPARC_WDISP19, -(Off + 4 - PltEntrySize)); +} + +TargetInfo *elf::getSPARCV9TargetInfo() { + static SPARCV9 Target; + return &Target; +} Modified: vendor/lld/dist/ELF/CMakeLists.txt ============================================================================== --- vendor/lld/dist/ELF/CMakeLists.txt Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/CMakeLists.txt Sat Jul 1 13:24:45 2017 (r320541) @@ -15,6 +15,7 @@ add_lld_library(lldELF Arch/MipsArchTree.cpp Arch/PPC.cpp Arch/PPC64.cpp + Arch/SPARCV9.cpp Arch/X86.cpp Arch/X86_64.cpp Driver.cpp Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/InputFiles.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -79,9 +79,9 @@ template void elf::ObjectFile::init ObjectInfo ObjInfo; DWARFContextInMemory Dwarf(*Obj, &ObjInfo); - DwarfLine.reset(new DWARFDebugLine(&Dwarf.getLineSection().Relocs)); - DataExtractor LineData(Dwarf.getLineSection().Data, Config->IsLE, - Config->Wordsize); + DwarfLine.reset(new DWARFDebugLine); + DWARFDataExtractor LineData(Dwarf.getLineSection(), Config->IsLE, + Config->Wordsize); // The second parameter is offset in .debug_line section // for compilation unit (CU) of interest. We have only one Modified: vendor/lld/dist/ELF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SymbolTable.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -195,14 +195,8 @@ template void SymbolTable::applySym for (auto &KV : Config->RenamedSymbols) { Symbol *Dst = KV.first; Symbol *Src = KV.second.Target; + Dst->body()->copy(Src->body()); Dst->Binding = KV.second.OriginalBinding; - - // We rename symbols by replacing the old symbol's SymbolBody with - // the new symbol's SymbolBody. The only attribute we want to keep - // is the symbol name, so that two symbols don't have the same name. - StringRef S = Dst->body()->getName(); - memcpy(Dst->Body.buffer, Src->Body.buffer, sizeof(Symbol::Body)); - Dst->body()->setName(S); } } @@ -718,15 +712,31 @@ void SymbolTable::assignWildcardVersion(SymbolVe B->symbol()->VersionId = VersionId; } +static bool isDefaultVersion(SymbolBody *B) { + return B->isInCurrentDSO() && B->getName().find("@@") != StringRef::npos; +} + // This function processes version scripts by updating VersionId // member of symbols. template void SymbolTable::scanVersionScript() { // Symbol themselves might know their versions because symbols // can contain versions in the form of @. - // Let them parse their names. - if (!Config->VersionDefinitions.empty()) - for (Symbol *Sym : SymVector) - Sym->body()->parseSymbolVersion(); + // Let them parse and update their names to exclude version suffix. + for (Symbol *Sym : SymVector) { + SymbolBody *Body = Sym->body(); + bool IsDefault = isDefaultVersion(Body); + Body->parseSymbolVersion(); + + if (!IsDefault) + continue; + + // @@ means the symbol is the default version. If that's the + // case, the symbol is not used only to resolve of version + // but also undefined unversioned symbols with name . + SymbolBody *S = find(Body->getName()); + if (S && S->isUndefined()) + S->copy(Body); + } // Handle edge cases first. handleAnonymousVersion(); Modified: vendor/lld/dist/ELF/SymbolTable.h ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SymbolTable.h Sat Jul 1 13:24:45 2017 (r320541) @@ -18,7 +18,7 @@ namespace lld { namespace elf { -class Lazy; + struct Symbol; // SymbolTable is a bucket of all known symbols, including defined, Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Symbols.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -159,6 +159,21 @@ bool SymbolBody::isPreemptible() const { return true; } +// Overwrites all attributes except symbol name with Other's so that +// this symbol becomes an alias to Other. This is useful for handling +// some options such as --wrap. +// +// The reason why we want to keep the symbol name is because, if we +// copy symbol names, we'll end up having symbol tables in resulting +// executables or DSOs containing two or more identical symbols, which +// is just inconvenient. +void SymbolBody::copy(SymbolBody *Other) { + StringRef S = Name; + memcpy(symbol()->Body.buffer, Other->symbol()->Body.buffer, + sizeof(Symbol::Body)); + Name = S; +} + uint64_t SymbolBody::getVA(int64_t Addend) const { uint64_t OutVA = getSymVA(*this, Addend); return OutVA + Addend; Modified: vendor/lld/dist/ELF/Symbols.h ============================================================================== --- vendor/lld/dist/ELF/Symbols.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Symbols.h Sat Jul 1 13:24:45 2017 (r320541) @@ -69,9 +69,9 @@ class SymbolBody { (public) bool isLocal() const { return IsLocal; } bool isPreemptible() const; StringRef getName() const { return Name; } - void setName(StringRef S) { Name = S; } uint8_t getVisibility() const { return StOther & 0x3; } void parseSymbolVersion(); + void copy(SymbolBody *Other); bool isInGot() const { return GotIndex != -1U; } bool isInPlt() const { return PltIndex != -1U; } Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -1090,8 +1090,17 @@ template void DynamicSection::final if (In::RelaPlt->getParent()->Size > 0) { add({DT_JMPREL, In::RelaPlt}); add({DT_PLTRELSZ, In::RelaPlt->getParent()->Size}); - add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT, - InX::GotPlt}); + switch (Config->EMachine) { + case EM_MIPS: + add({DT_MIPS_PLTGOT, In::GotPlt}); + break; + case EM_SPARCV9: + add({DT_PLTGOT, In::Plt}); + break; + default: + add({DT_PLTGOT, In::GotPlt}); + break; + } add({DT_PLTREL, uint64_t(Config->IsRela ? DT_RELA : DT_REL)}); } @@ -1376,7 +1385,6 @@ template void SymbolTableSection::w } ESym->st_name = Ent.StrTabOffset; - ESym->st_size = Body->getSize(); // Set a section index. if (const OutputSection *OutSec = Body->getOutputSection()) @@ -1386,6 +1394,14 @@ template void SymbolTableSection::w else if (isa(Body)) ESym->st_shndx = SHN_COMMON; + // Copy symbol size if it is a defined symbol. st_size is not significant + // for undefined symbols, so whether copying it or not is up to us if that's + // the case. We'll leave it as zero because by not setting a value, we can + // get the exact same outputs for two sets of input files that differ only + // in undefined symbol size in DSOs. + if (ESym->st_shndx != SHN_UNDEF) + ESym->st_size = Body->getSize(); + // st_value is usually an address of a symbol, but that has a // special meaining for uninstantiated common symbols (this can // occur if -r is given). @@ -1625,7 +1641,12 @@ template void HashTableSection::wri PltSection::PltSection(size_t S) : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, 16, ".plt"), - HeaderSize(S) {} + HeaderSize(S) { + // The PLT needs to be writable on SPARC as the dynamic linker will + // modify the instructions in the PLT entries. + if (Config->EMachine == EM_SPARCV9) + this->Flags |= SHF_WRITE; +} void PltSection::writeTo(uint8_t *Buf) { // At beginning of PLT but not the IPLT, we have code to call the dynamic Modified: vendor/lld/dist/ELF/Target.cpp ============================================================================== --- vendor/lld/dist/ELF/Target.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Target.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -77,6 +77,8 @@ TargetInfo *elf::getTarget() { return getPPCTargetInfo(); case EM_PPC64: return getPPC64TargetInfo(); + case EM_SPARCV9: + return getSPARCV9TargetInfo(); case EM_X86_64: if (Config->EKind == ELF32LEKind) return getX32TargetInfo(); Modified: vendor/lld/dist/ELF/Target.h ============================================================================== --- vendor/lld/dist/ELF/Target.h Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Target.h Sat Jul 1 13:24:45 2017 (r320541) @@ -112,6 +112,7 @@ TargetInfo *getARMTargetInfo(); TargetInfo *getAVRTargetInfo(); TargetInfo *getPPC64TargetInfo(); TargetInfo *getPPCTargetInfo(); +TargetInfo *getSPARCV9TargetInfo(); TargetInfo *getX32TargetInfo(); TargetInfo *getX86TargetInfo(); TargetInfo *getX86_64TargetInfo(); Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/ELF/Writer.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -104,7 +104,7 @@ StringRef elf::getOutputSectionName(StringRef Name) { for (StringRef V : {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.rel.ro.", ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.", - ".gcc_except_table.", ".tdata.", ".ARM.exidx."}) { + ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab."}) { StringRef Prefix = V.drop_back(); if (Name.startswith(V) || Name == Prefix) return Prefix; @@ -1014,13 +1014,13 @@ findOrphanPos(std::vector::iterator B, } template void Writer::sortSections() { + if (Script->Opt.HasSections) + Script->adjustSectionsBeforeSorting(); + // Don't sort if using -r. It is not necessary and we want to preserve the // relative order for SHF_LINK_ORDER sections. if (Config->Relocatable) return; - - if (Script->Opt.HasSections) - Script->adjustSectionsBeforeSorting(); for (BaseCommand *Base : Script->Opt.Commands) if (auto *Cmd = dyn_cast(Base)) Modified: vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Sat Jul 1 13:24:45 2017 (r320541) @@ -44,7 +44,6 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(DependentDylib) LLVM_YAML_IS_SEQUENCE_VECTOR(RebaseLocation) LLVM_YAML_IS_SEQUENCE_VECTOR(BindLocation) LLVM_YAML_IS_SEQUENCE_VECTOR(Export) -LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef) LLVM_YAML_IS_SEQUENCE_VECTOR(DataInCode) Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/combined-resources-2.rc Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,36 @@ +#include "windows.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +randomdat RCDATA +{ + "this is a random bit of data that means nothing\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +randomdat RCDATA +{ + "zhe4 shi4 yi1ge4 sui2ji1 de shu4ju4, zhe4 yi4wei4zhe shen2me\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_LUXEMBOURG +randomdat RCDATA +{ + "Dies ist ein zufälliges Bit von Daten, die nichts bedeutet\0", + 0x23a9, + 0x140e, + 194292, +} + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +myaccelerators ACCELERATORS +{ + "^C", 999, VIRTKEY, ALT + "D", 1100, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-2.res ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-cursor.bmp ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources-okay.bmp ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/combined-resources.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/combined-resources.rc Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,50 @@ +#include "windows.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +myaccelerators ACCELERATORS +{ + "^C", 999, VIRTKEY, ALT + "D", 1100, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} + +cursor BITMAP "combined-resources-cursor.bmp" +okay BITMAP "combined-resources-okay.bmp" + +14432 MENU +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +{ + MENUITEM "yu", 100 + MENUITEM "shala", 101 + MENUITEM "kaoya", 102 +} + +testdialog DIALOG 10, 10, 200, 300 +STYLE WS_POPUP | WS_BORDER +CAPTION "Test" +{ + CTEXT "Continue:", 1, 10, 10, 230, 14 + PUSHBUTTON "&OK", 2, 66, 134, 161, 13 +} + +12 ACCELERATORS +{ + "X", 164, VIRTKEY, ALT + "H", 5678, VIRTKEY, CONTROL, SHIFT + "^R", 444, ASCII, NOINVERT +} + +"eat" MENU +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +{ + MENUITEM "fish", 100 + MENUITEM "salad", 101 + MENUITEM "duck", 102 +} + + +myresource stringarray { + "this is a user defined resource\0", + "it contains many strings\0", +} Added: vendor/lld/dist/test/COFF/Inputs/combined-resources.res ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/pdb-global-gc.s Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,4 @@ +.section .data,"dw",one_only,__wc_mb_cur +.global __wc_mb_cur +__wc_mb_cur: +.long 42 Added: vendor/lld/dist/test/COFF/Inputs/pdb-import-gc.lib ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/COFF/combined-resources.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/combined-resources.test Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,17 @@ +// Check that lld properly handles merging multiple .res files. +// The inputs were generated with the following commands, using the original +// Windows rc.exe +// > rc /fo combined-resources.res /nologo combined-resources.rc +// > rc /fo combined-resources-2.res /nologo combined-resources-2.rc + +# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj +# RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/resource.res \ +# RUN: %p/Inputs/combined-resources.res %p/Inputs/combined-resources-2.res + +# RUN: llvm-readobj -coff-resources -file-headers %t.exe | FileCheck %s + + +CHECK: ResourceTableRVA: 0x1000 +CHECK-NEXT: ResourceTableSize: 0xC1C +CHECK-DAG: Resources [ +CHECK-NEXT: Total Number of Resources: 13 Modified: vendor/lld/dist/test/COFF/hello32.test ============================================================================== --- vendor/lld/dist/test/COFF/hello32.test Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/test/COFF/hello32.test Sat Jul 1 13:24:45 2017 (r320541) @@ -21,6 +21,7 @@ HEADER-NEXT: IMAGE_FILE_EXECUTABLE_IMAGE (0x2) HEADER-NEXT: ] HEADER-NEXT: } HEADER-NEXT: ImageOptionalHeader { +HEADER-NEXT: Magic: 0x10B HEADER-NEXT: MajorLinkerVersion: 14 HEADER-NEXT: MinorLinkerVersion: 0 HEADER-NEXT: SizeOfCode: 512 Modified: vendor/lld/dist/test/COFF/pdb-comdat.test ============================================================================== --- vendor/lld/dist/test/COFF/pdb-comdat.test Sat Jul 1 13:24:41 2017 (r320540) +++ vendor/lld/dist/test/COFF/pdb-comdat.test Sat Jul 1 13:24:45 2017 (r320541) @@ -41,49 +41,48 @@ CHECK-LABEL: Mod 0002 | `* Linker *`: CHECK: Symbols CHECK: ============================================================ CHECK-LABEL: Mod 0000 | `{{.*}}pdb_comdat_main.obj`: -CHECK: - S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj` -CHECK: - S_COMPILE3 [size = 60] -CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c -CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 -CHECK: flags = security checks | hot patchable -CHECK: - S_GPROC32_ID [size = 44] `main` - FIXME: We need to fill in "end". -CHECK: parent = 0, addr = 0002:0000, code size = 24, end = 0 -CHECK: debug start = 4, debug end = 19, flags = none -CHECK: - S_FRAMEPROC [size = 32] -CHECK: size = 40, padding size = 0, offset to padding = 0 -CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 -CHECK: flags = has async eh | opt speed -CHECK: - S_END [size = 4] -CHECK: - S_GDATA32 [size = 24] `global` -CHECK: type = 0x0074 (int), addr = 0000:0000 -CHECK: - S_BUILDINFO [size = 8] BuildId = `4106` -CHECK: - S_GPROC32_ID [size = 44] `foo` -CHECK: parent = 0, addr = 0002:0032, code size = 15, end = 0 -CHECK: debug start = 0, debug end = 14, flags = none -CHECK: - S_FRAMEPROC [size = 32] -CHECK: size = 0, padding size = 0, offset to padding = 0 -CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 -CHECK: flags = marked inline | has async eh | opt speed -CHECK: - S_END [size = 4] +CHECK: 4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_main.obj` +CHECK: 60 | S_COMPILE3 [size = 60] +CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c +CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 +CHECK: flags = security checks | hot patchable +CHECK: 120 | S_GPROC32_ID [size = 44] `main` +CHECK: parent = 0, end = 0, addr = 0002:0000, code size = 24 +CHECK: debug start = 4, debug end = 19, flags = none +CHECK: 164 | S_FRAMEPROC [size = 32] +CHECK: size = 40, padding size = 0, offset to padding = 0 +CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 +CHECK: flags = has async eh | opt speed +CHECK: 196 | S_END [size = 4] +CHECK: 200 | S_GDATA32 [size = 24] `global` +CHECK: type = 0x0074 (int), addr = 0000:0000 +CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `4106` +CHECK: 232 | S_GPROC32_ID [size = 44] `foo` +CHECK: parent = 0, end = 0, addr = 0002:0032, code size = 15 +CHECK: debug start = 0, debug end = 14, flags = none +CHECK: 276 | S_FRAMEPROC [size = 32] +CHECK: size = 0, padding size = 0, offset to padding = 0 +CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 +CHECK: flags = marked inline | has async eh | opt speed +CHECK: 308 | S_END [size = 4] CHECK-LABEL: Mod 0001 | `{{.*}}pdb_comdat_bar.obj`: -CHECK: - S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_bar.obj` -CHECK: - S_COMPILE3 [size = 60] +CHECK: 4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_bar.obj` +CHECK: 60 | S_COMPILE3 [size = 60] CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1 CHECK: flags = security checks | hot patchable -CHECK: - S_GPROC32_ID [size = 44] `bar` -CHECK: parent = 0, addr = 0002:0048, code size = 14, end = 0 +CHECK: 120 | S_GPROC32_ID [size = 44] `bar` +CHECK: parent = 0, end = 0, addr = 0002:0048, code size = 14 CHECK: debug start = 4, debug end = 9, flags = none -CHECK: - S_FRAMEPROC [size = 32] +CHECK: 164 | S_FRAMEPROC [size = 32] CHECK: size = 40, padding size = 0, offset to padding = 0 CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000 CHECK: flags = has async eh | opt speed -CHECK: - S_END [size = 4] -CHECK: - S_GDATA32 [size = 24] `global` +CHECK: 196 | S_END [size = 4] +CHECK: 200 | S_GDATA32 [size = 24] `global` CHECK: type = 0x0074 (int), addr = 0000:0000 -CHECK: - S_BUILDINFO [size = 8] BuildId = `4109` -CHECK-NOT: - S_GPROC32_ID {{.*}} `foo` +CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `4109` +CHECK-NOT: S_GPROC32_ID {{.*}} `foo` CHECK-LABEL: Mod 0002 | `* Linker *`: Reorder the object files and verify that the other table is selected. Added: vendor/lld/dist/test/COFF/pdb-global-gc.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/pdb-global-gc.yaml Sat Jul 1 13:24:45 2017 (r320541) @@ -0,0 +1,116 @@ +# RUN: yaml2obj %s -o %t.obj +# RUN: llvm-mc %S/Inputs/pdb-global-gc.s -triple x86_64-windows-msvc -filetype=obj -o %t2.obj +# RUN: lld-link %t.obj %t2.obj -debug -entry:main \ +# RUN: -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb -verbose +# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s + +# This tests the case where an __imp_ chunk is discarded by linker GC. The debug +# info may refer to the __imp_ symbol still. + +# Compile this code with MSVC to regenerate the test case: +# extern char __declspec(dllimport) __wc_mb_cur; +# int discarded() { return __wc_mb_cur; } +# int main() { return g2; } + +# CHECK: Symbols +# CHECK: ============================================================ +# CHECK: Mod 0000 | `{{.*}}pdb-global-gc.yaml.tmp.obj`: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:24:52 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BAC0D89935; Sat, 1 Jul 2017 13:24:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1EA6EA5; Sat, 1 Jul 2017 13:24:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DOo4D022491; Sat, 1 Jul 2017 13:24:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOovA022490; Sat, 1 Jul 2017 13:24:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOovA022490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320542 - vendor/lld/lld-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-trunk-r306956 X-SVN-Commit-Revision: 320542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:24:52 -0000 Author: dim Date: Sat Jul 1 13:24:50 2017 New Revision: 320542 URL: https://svnweb.freebsd.org/changeset/base/320542 Log: Tag lld trunk r306956. Added: vendor/lld/lld-trunk-r306956/ - copied from r320541, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:25:08 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 201CBD899F9; Sat, 1 Jul 2017 13:25:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA8A81056; Sat, 1 Jul 2017 13:25:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DP6n3022635; Sat, 1 Jul 2017 13:25:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DP6Ki022634; Sat, 1 Jul 2017 13:25:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011325.v61DP6Ki022634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320544 - vendor/lldb/lldb-trunk-r306956 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-trunk-r306956 X-SVN-Commit-Revision: 320544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:25:08 -0000 Author: dim Date: Sat Jul 1 13:25:06 2017 New Revision: 320544 URL: https://svnweb.freebsd.org/changeset/base/320544 Log: Tag lldb trunk r306956. Added: vendor/lldb/lldb-trunk-r306956/ - copied from r320543, vendor/lldb/dist/ From owner-svn-src-vendor@freebsd.org Sat Jul 1 13:25:04 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 054A8D899DE; Sat, 1 Jul 2017 13:25:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93279FE3; Sat, 1 Jul 2017 13:25:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61DP2Hk022585; Sat, 1 Jul 2017 13:25:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61DOxu8022540; Sat, 1 Jul 2017 13:24:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707011324.v61DOxu8022540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Jul 2017 13:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r320543 - in vendor/lldb/dist: include/lldb include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Host include/lldb/Host/common include/lldb/Host/linux incl... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist: include/lldb include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Host include/lldb/Host/common include/lldb/Host/linux include/lldb/Host/posix inclu... X-SVN-Commit-Revision: 320543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 13:25:04 -0000 Author: dim Date: Sat Jul 1 13:24:58 2017 New Revision: 320543 URL: https://svnweb.freebsd.org/changeset/base/320543 Log: Vendor import of lldb trunk r306956: https://llvm.org/svn/llvm-project/lldb/trunk@306956 Added: vendor/lldb/dist/include/lldb/Utility/Connection.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/IOObject.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/StructuredData.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/Timer.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/TraceOptions.h (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Linux/ProcessorTrace.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Linux/ProcessorTrace.h (contents, props changed) vendor/lldb/dist/source/Utility/Connection.cpp (contents, props changed) vendor/lldb/dist/source/Utility/IOObject.cpp (contents, props changed) vendor/lldb/dist/source/Utility/StructuredData.cpp (contents, props changed) vendor/lldb/dist/source/Utility/Timer.cpp (contents, props changed) vendor/lldb/dist/unittests/Process/Linux/ vendor/lldb/dist/unittests/Process/Linux/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/Process/Linux/ProcessorTraceTest.cpp (contents, props changed) vendor/lldb/dist/unittests/Symbol/Inputs/ vendor/lldb/dist/unittests/Symbol/Inputs/basic-call-frame-info.yaml vendor/lldb/dist/unittests/Symbol/TestDWARFCallFrameInfo.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/ vendor/lldb/dist/unittests/Utility/Helpers/CMakeLists.txt (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/MockTildeExpressionResolver.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/MockTildeExpressionResolver.h (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/TestUtilities.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/Helpers/TestUtilities.h (contents, props changed) vendor/lldb/dist/unittests/Utility/Inputs/ vendor/lldb/dist/unittests/Utility/Inputs/StructuredData-basic.json vendor/lldb/dist/unittests/Utility/StructuredDataTest.cpp (contents, props changed) vendor/lldb/dist/unittests/Utility/TimerTest.cpp (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/StructuredData.h vendor/lldb/dist/include/lldb/Core/Timer.h vendor/lldb/dist/include/lldb/Core/TraceOptions.h vendor/lldb/dist/include/lldb/Host/IOObject.h vendor/lldb/dist/source/Core/Connection.cpp vendor/lldb/dist/source/Core/StructuredData.cpp vendor/lldb/dist/source/Core/Timer.cpp vendor/lldb/dist/source/Host/common/IOObject.cpp vendor/lldb/dist/unittests/Core/StructuredDataTest.cpp vendor/lldb/dist/unittests/Core/TimerTest.cpp vendor/lldb/dist/unittests/Utility/Mocks/CMakeLists.txt vendor/lldb/dist/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp vendor/lldb/dist/unittests/Utility/Mocks/MockTildeExpressionResolver.h Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h vendor/lldb/dist/include/lldb/Core/Event.h vendor/lldb/dist/include/lldb/Core/SearchFilter.h vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/MainLoopBase.h vendor/lldb/dist/include/lldb/Host/Socket.h vendor/lldb/dist/include/lldb/Host/XML.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/linux/Support.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h vendor/lldb/dist/include/lldb/Target/ABI.h vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Target/StopInfo.h vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h vendor/lldb/dist/include/lldb/Target/SystemRuntime.h vendor/lldb/dist/include/lldb/Target/Thread.h vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h vendor/lldb/dist/include/lldb/Target/ThreadSpec.h vendor/lldb/dist/include/lldb/Utility/JSON.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/include/lldb/lldb-private-interfaces.h vendor/lldb/dist/lldb.xcodeproj/project.pbxproj vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py vendor/lldb/dist/packages/Python/lldbsuite/test/make/Android.rules vendor/lldb/dist/scripts/Xcode/build-llvm.py vendor/lldb/dist/scripts/Xcode/repo.py vendor/lldb/dist/scripts/analyze-project-deps.py vendor/lldb/dist/source/API/SBCommunication.cpp vendor/lldb/dist/source/API/SBStructuredData.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBThreadPlan.cpp vendor/lldb/dist/source/API/SBTraceOptions.cpp vendor/lldb/dist/source/API/SystemInitializerFull.cpp vendor/lldb/dist/source/Commands/CommandObjectFrame.cpp vendor/lldb/dist/source/Commands/CommandObjectLog.cpp vendor/lldb/dist/source/Commands/CommandObjectTarget.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Core/CMakeLists.txt vendor/lldb/dist/source/Core/Communication.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Core/FormatEntity.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Host/CMakeLists.txt vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/Symbols.cpp vendor/lldb/dist/source/Host/freebsd/Host.cpp vendor/lldb/dist/source/Host/linux/Support.cpp vendor/lldb/dist/source/Host/macosx/Host.mm vendor/lldb/dist/source/Host/macosx/Symbols.cpp vendor/lldb/dist/source/Host/netbsd/Host.cpp vendor/lldb/dist/source/Host/openbsd/Host.cpp vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp vendor/lldb/dist/source/Host/windows/Host.cpp vendor/lldb/dist/source/Initialization/SystemInitializerCommon.cpp vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm/ABISysV_arm.h vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-i386/ABISysV_i386.h vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-mips/ABISysV_mips.h vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h vendor/lldb/dist/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h vendor/lldb/dist/source/Plugins/Language/ObjC/Cocoa.cpp vendor/lldb/dist/source/Plugins/Language/ObjC/NSSet.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp vendor/lldb/dist/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp vendor/lldb/dist/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp vendor/lldb/dist/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp vendor/lldb/dist/source/Plugins/Process/Linux/CMakeLists.txt vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeProcessLinux.h vendor/lldb/dist/source/Plugins/Process/POSIX/CMakeLists.txt vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp vendor/lldb/dist/source/Plugins/Process/Utility/DynamicRegisterInfo.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLLDB.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h vendor/lldb/dist/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp vendor/lldb/dist/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp vendor/lldb/dist/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp vendor/lldb/dist/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp vendor/lldb/dist/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h vendor/lldb/dist/source/Symbol/DWARFCallFrameInfo.cpp vendor/lldb/dist/source/Symbol/FuncUnwinders.cpp vendor/lldb/dist/source/Symbol/ObjectFile.cpp vendor/lldb/dist/source/Symbol/Symtab.cpp vendor/lldb/dist/source/Symbol/UnwindTable.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Target/ABI.cpp vendor/lldb/dist/source/Target/ObjCLanguageRuntime.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/Target.cpp vendor/lldb/dist/source/Target/TargetList.cpp vendor/lldb/dist/source/Target/ThreadSpec.cpp vendor/lldb/dist/source/Utility/CMakeLists.txt vendor/lldb/dist/source/Utility/JSON.cpp vendor/lldb/dist/tools/debugserver/source/RNBRemote.cpp vendor/lldb/dist/tools/debugserver/source/debugserver.cpp vendor/lldb/dist/tools/lldb-server/Acceptor.h vendor/lldb/dist/unittests/Core/CMakeLists.txt vendor/lldb/dist/unittests/Interpreter/CMakeLists.txt vendor/lldb/dist/unittests/Interpreter/TestCompletion.cpp vendor/lldb/dist/unittests/ObjectFile/ELF/CMakeLists.txt vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp vendor/lldb/dist/unittests/Process/CMakeLists.txt vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp vendor/lldb/dist/unittests/Process/minidump/CMakeLists.txt vendor/lldb/dist/unittests/Process/minidump/MinidumpParserTest.cpp vendor/lldb/dist/unittests/Symbol/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/DWARF/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp vendor/lldb/dist/unittests/SymbolFile/PDB/CMakeLists.txt vendor/lldb/dist/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp vendor/lldb/dist/unittests/Target/CMakeLists.txt vendor/lldb/dist/unittests/Target/ModuleCacheTest.cpp vendor/lldb/dist/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp vendor/lldb/dist/unittests/Utility/CMakeLists.txt vendor/lldb/dist/unittests/Utility/TildeExpressionResolverTest.cpp vendor/lldb/dist/unittests/tools/lldb-server/tests/MessageObjects.cpp vendor/lldb/dist/www/projects.html Modified: vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h Sat Jul 1 13:24:58 2017 (r320543) @@ -26,8 +26,8 @@ #include "lldb/Breakpoint/Stoppoint.h" #include "lldb/Core/Event.h" #include "lldb/Core/SearchFilter.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/StringList.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h ============================================================================== --- vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Breakpoint/BreakpointOptions.h Sat Jul 1 13:24:58 2017 (r320543) @@ -17,9 +17,9 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Baton.h" #include "lldb/Utility/StringList.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Core/Event.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Event.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/Event.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,9 +11,9 @@ #define liblldb_Event_h_ #include "lldb/Core/Broadcaster.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Host/Predicate.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN #include "lldb/lldb-forward.h" // for EventDataSP, ProcessSP, Struct... Modified: vendor/lldb/dist/include/lldb/Core/SearchFilter.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/SearchFilter.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/SearchFilter.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,7 +11,7 @@ #define liblldb_SearchFilter_h_ #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/FileSpec.h" // for FileSpec #include "lldb/lldb-forward.h" // for SearchFilterSP, TargetSP, Modu... Modified: vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,10 +11,10 @@ #define liblldb_StructuredDataImpl_h_ #include "lldb/Core/Event.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Target/StructuredDataPlugin.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/Stream.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" #include "llvm/ADT/StringRef.h" Modified: vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h Sat Jul 1 13:24:58 2017 (r320543) @@ -24,8 +24,8 @@ #include "lldb/lldb-public.h" #include "lldb/Core/FormatEntity.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { class TypeSummaryOptions { Modified: vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h Sat Jul 1 13:24:58 2017 (r320543) @@ -25,8 +25,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-public.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/ValueObject.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { class SyntheticChildrenFrontEnd { Modified: vendor/lldb/dist/include/lldb/Host/File.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/File.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/File.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,8 +10,8 @@ #ifndef liblldb_File_h_ #define liblldb_File_h_ -#include "lldb/Host/IOObject.h" #include "lldb/Host/PosixApi.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Host/Host.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Host.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/Host.h Sat Jul 1 13:24:58 2017 (r320543) @@ -238,6 +238,9 @@ class Host { (public) uint32_t line_no); static size_t GetEnvironment(StringList &env); + + static std::unique_ptr + CreateDefaultConnection(llvm::StringRef url); }; } // namespace lldb_private Modified: vendor/lldb/dist/include/lldb/Host/MainLoopBase.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/MainLoopBase.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/MainLoopBase.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,12 +10,10 @@ #ifndef lldb_Host_posix_MainLoopBase_h_ #define lldb_Host_posix_MainLoopBase_h_ -#include - -#include "llvm/Support/ErrorHandling.h" - -#include "lldb/Host/IOObject.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" +#include "llvm/Support/ErrorHandling.h" +#include namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/Socket.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Socket.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/Socket.h Sat Jul 1 13:24:58 2017 (r320543) @@ -15,9 +15,9 @@ #include "lldb/lldb-private.h" -#include "lldb/Host/IOObject.h" #include "lldb/Host/Predicate.h" #include "lldb/Host/SocketAddress.h" +#include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" #ifdef _WIN32 Modified: vendor/lldb/dist/include/lldb/Host/XML.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/XML.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/XML.h Sat Jul 1 13:24:58 2017 (r320543) @@ -24,8 +24,8 @@ #include "llvm/ADT/StringRef.h" // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/StreamString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,10 +10,10 @@ #ifndef liblldb_NativeProcessProtocol_h_ #define liblldb_NativeProcessProtocol_h_ -#include "lldb/Core/TraceOptions.h" #include "lldb/Host/Host.h" #include "lldb/Host/MainLoop.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/TraceOptions.h" #include "lldb/lldb-private-forward.h" #include "lldb/lldb-types.h" #include "llvm/ADT/ArrayRef.h" @@ -333,7 +333,7 @@ class NativeProcessProtocol (public) //------------------------------------------------------------------ /// StopTracing API as the name suggests stops a tracing instance. /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the trace intended to be stopped. Now a /// user_id may map to multiple threads in which case this API /// could be used to stop the tracing for a specific thread by @@ -346,7 +346,7 @@ class NativeProcessProtocol (public) /// @return /// Status indicating what went wrong. //------------------------------------------------------------------ - virtual Status StopTrace(lldb::user_id_t uid, + virtual Status StopTrace(lldb::user_id_t traceid, lldb::tid_t thread = LLDB_INVALID_THREAD_ID) { return Status("Not implemented"); } @@ -355,8 +355,8 @@ class NativeProcessProtocol (public) /// This API provides the trace data collected in the form of raw /// data. /// - /// @param[in] uid thread - /// The uid and thread provide the context for the trace + /// @param[in] traceid thread + /// The traceid and thread provide the context for the trace /// instance. /// /// @param[in] buffer @@ -372,7 +372,7 @@ class NativeProcessProtocol (public) /// @return /// The size of the data actually read. //------------------------------------------------------------------ - virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -382,7 +382,7 @@ class NativeProcessProtocol (public) /// Similar API as above except it aims to provide any extra data /// useful for decoding the actual trace data. //------------------------------------------------------------------ - virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetMetaData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -391,7 +391,7 @@ class NativeProcessProtocol (public) //------------------------------------------------------------------ /// API to query the TraceOptions for a given user id /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the tracing instance. /// /// @param[in] config @@ -405,7 +405,7 @@ class NativeProcessProtocol (public) /// @param[out] config /// The actual configuration being used for tracing. //------------------------------------------------------------------ - virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &config) { + virtual Status GetTraceConfig(lldb::user_id_t traceid, TraceOptions &config) { return Status("Not implemented"); } Modified: vendor/lldb/dist/include/lldb/Host/linux/Support.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/linux/Support.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/linux/Support.h Sat Jul 1 13:24:58 2017 (r320543) @@ -22,6 +22,9 @@ getProcFile(::pid_t pid, ::pid_t tid, const llvm::Twin llvm::ErrorOr> getProcFile(::pid_t pid, const llvm::Twine &file); +llvm::ErrorOr> +getProcFile(const llvm::Twine &file); + } // namespace lldb_private #endif // #ifndef LLDB_HOST_LINUX_SUPPORT_H Modified: vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sat Jul 1 13:24:58 2017 (r320543) @@ -19,10 +19,10 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Connection.h" -#include "lldb/Host/IOObject.h" #include "lldb/Host/Pipe.h" #include "lldb/Host/Predicate.h" +#include "lldb/Utility/Connection.h" +#include "lldb/Utility/IOObject.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Host/windows/ConnectionGenericFileWindows.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,8 +10,8 @@ #ifndef liblldb_Host_windows_ConnectionGenericFileWindows_h_ #define liblldb_Host_windows_ConnectionGenericFileWindows_h_ -#include "lldb/Core/Connection.h" #include "lldb/Host/windows/windows.h" +#include "lldb/Utility/Connection.h" #include "lldb/lldb-types.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h ============================================================================== --- vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Interpreter/ScriptInterpreter.h Sat Jul 1 13:24:58 2017 (r320543) @@ -19,8 +19,8 @@ #include "lldb/Breakpoint/BreakpointOptions.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Host/PseudoTerminal.h" Modified: vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/DWARFCallFrameInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -34,11 +34,12 @@ namespace lldb_private { class DWARFCallFrameInfo { public: - DWARFCallFrameInfo(ObjectFile &objfile, lldb::SectionSP §ion, - lldb::RegisterKind reg_kind, bool is_eh_frame); + enum Type { EH, DWARF }; - ~DWARFCallFrameInfo(); + DWARFCallFrameInfo(ObjectFile &objfile, lldb::SectionSP §ion, Type type); + ~DWARFCallFrameInfo() = default; + // Locate an AddressRange that includes the provided Address in this // object's eh_frame/debug_info // Returns true if a range is found to cover that address. @@ -74,12 +75,20 @@ class DWARFCallFrameInfo { (public) private: enum { CFI_AUG_MAX_SIZE = 8, CFI_HEADER_SIZE = 8 }; + enum CFIVersion { + CFI_VERSION1 = 1, // DWARF v.2 + CFI_VERSION3 = 3, // DWARF v.3 + CFI_VERSION4 = 4 // DWARF v.4, v.5 + }; struct CIE { dw_offset_t cie_offset; uint8_t version; char augmentation[CFI_AUG_MAX_SIZE]; // This is typically empty or very // short. + uint8_t address_size = sizeof(uint32_t); // The size of a target address. + uint8_t segment_size = 0; // The size of a segment selector. + uint32_t code_align; int32_t data_align; uint32_t return_addr_reg_num; @@ -134,21 +143,24 @@ class DWARFCallFrameInfo { (public) ObjectFile &m_objfile; lldb::SectionSP m_section_sp; - lldb::RegisterKind m_reg_kind; - Flags m_flags; + Flags m_flags = 0; cie_map_t m_cie_map; DataExtractor m_cfi_data; - bool m_cfi_data_initialized; // only copy the section into the DE once + bool m_cfi_data_initialized = false; // only copy the section into the DE once FDEEntryMap m_fde_index; - bool m_fde_index_initialized; // only scan the section for FDEs once + bool m_fde_index_initialized = false; // only scan the section for FDEs once std::mutex m_fde_index_mutex; // and isolate the thread that does it - bool m_is_eh_frame; + Type m_type; CIESP ParseCIE(const uint32_t cie_offset); + + lldb::RegisterKind GetRegisterKind() const { + return m_type == EH ? lldb::eRegisterKindEHFrame : lldb::eRegisterKindDWARF; + } }; } // namespace lldb_private Modified: vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/FuncUnwinders.h Sat Jul 1 13:24:58 2017 (r320543) @@ -99,6 +99,13 @@ class FuncUnwinders { (public) Thread &thread, int current_offset); + lldb::UnwindPlanSP GetDebugFrameUnwindPlan(Target &target, + int current_offset); + + lldb::UnwindPlanSP GetDebugFrameAugmentedUnwindPlan(Target &target, + Thread &thread, + int current_offset); + lldb::UnwindPlanSP GetCompactUnwindUnwindPlan(Target &target, int current_offset); @@ -126,10 +133,12 @@ class FuncUnwinders { (public) lldb::UnwindPlanSP m_unwind_plan_assembly_sp; lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp; - lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp; // augmented by - // assembly inspection - // so it's valid - // everywhere + lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp; + + // augmented by assembly inspection so it's valid everywhere + lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp; + lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp; + std::vector m_unwind_plan_compact_unwind; lldb::UnwindPlanSP m_unwind_plan_arm_unwind_sp; lldb::UnwindPlanSP m_unwind_plan_fast_sp; @@ -139,7 +148,9 @@ class FuncUnwinders { (public) // Fetching the UnwindPlans can be expensive - if we've already attempted // to get one & failed, don't try again. bool m_tried_unwind_plan_assembly : 1, m_tried_unwind_plan_eh_frame : 1, + m_tried_unwind_plan_debug_frame : 1, m_tried_unwind_plan_eh_frame_augmented : 1, + m_tried_unwind_plan_debug_frame_augmented : 1, m_tried_unwind_plan_compact_unwind : 1, m_tried_unwind_plan_arm_unwind : 1, m_tried_unwind_fast : 1, m_tried_unwind_arch_default : 1, Modified: vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Symbol/UnwindTable.h Sat Jul 1 13:24:58 2017 (r320543) @@ -27,6 +27,7 @@ class UnwindTable { (public) ~UnwindTable(); lldb_private::DWARFCallFrameInfo *GetEHFrameInfo(); + lldb_private::DWARFCallFrameInfo *GetDebugFrameInfo(); lldb_private::CompactUnwindInfo *GetCompactUnwindInfo(); @@ -58,6 +59,8 @@ class UnwindTable { (public) void Dump(Stream &s); void Initialize(); + llvm::Optional GetAddressRange(const Address &addr, + SymbolContext &sc); typedef std::map collection; typedef collection::iterator iterator; @@ -70,6 +73,7 @@ class UnwindTable { (public) std::mutex m_mutex; std::unique_ptr m_eh_frame_up; + std::unique_ptr m_debug_frame_up; std::unique_ptr m_compact_unwind_up; std::unique_ptr m_arm_unwind_up; Modified: vendor/lldb/dist/include/lldb/Target/ABI.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ABI.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ABI.h Sat Jul 1 13:24:58 2017 (r320543) @@ -92,6 +92,16 @@ class ABI : public PluginInterface { (protected) virtual lldb::ValueObjectSP GetReturnValueObjectImpl(Thread &thread, llvm::Type &ir_type) const; + //------------------------------------------------------------------ + /// Request to get a Process shared pointer. + /// + /// This ABI object may not have been created with a Process object, + /// or the Process object may no longer be alive. Be sure to handle + /// the case where the shared pointer returned does not have an + /// object inside it. + //------------------------------------------------------------------ + lldb::ProcessSP GetProcessSP() const { return m_process_wp.lock(); } + public: virtual bool CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) = 0; @@ -131,13 +141,18 @@ class ABI : public PluginInterface { (protected) virtual bool GetPointerReturnRegister(const char *&name) { return false; } - static lldb::ABISP FindPlugin(const ArchSpec &arch); + static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch); protected: //------------------------------------------------------------------ // Classes that inherit from ABI can see and modify these //------------------------------------------------------------------ - ABI(); + ABI(lldb::ProcessSP process_sp) { + if (process_sp.get()) + m_process_wp = process_sp; + } + + lldb::ProcessWP m_process_wp; private: DISALLOW_COPY_AND_ASSIGN(ABI); Modified: vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/InstrumentationRuntime.h Sat Jul 1 13:24:58 2017 (r320543) @@ -18,7 +18,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-forward.h" #include "lldb/lldb-private.h" #include "lldb/lldb-types.h" Modified: vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/InstrumentationRuntimeStopInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -16,8 +16,8 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/StopInfo.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/Process.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/Process.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/Process.h Sat Jul 1 13:24:58 2017 (r320543) @@ -34,9 +34,7 @@ #include "lldb/Core/Listener.h" #include "lldb/Core/LoadedModuleInfoList.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/ThreadSafeValue.h" -#include "lldb/Core/TraceOptions.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ProcessRunLock.h" @@ -50,6 +48,8 @@ #include "lldb/Target/ThreadList.h" #include "lldb/Utility/NameMatches.h" #include "lldb/Utility/Status.h" +#include "lldb/Utility/StructuredData.h" +#include "lldb/Utility/TraceOptions.h" #include "lldb/lldb-private.h" #include "llvm/ADT/ArrayRef.h" Modified: vendor/lldb/dist/include/lldb/Target/StopInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/StopInfo.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/StopInfo.h Sat Jul 1 13:24:58 2017 (r320543) @@ -16,8 +16,8 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-public.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/StructuredDataPlugin.h Sat Jul 1 13:24:58 2017 (r320543) @@ -11,7 +11,7 @@ #define StructuredDataPlugin_h #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StructuredData.h" namespace lldb_private { Modified: vendor/lldb/dist/include/lldb/Target/SystemRuntime.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/SystemRuntime.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/SystemRuntime.h Sat Jul 1 13:24:58 2017 (r320543) @@ -18,10 +18,10 @@ #include "lldb/Core/ModuleList.h" #include "lldb/Core/PluginInterface.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Target/QueueItem.h" #include "lldb/Target/QueueList.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" #include "lldb/lldb-public.h" Modified: vendor/lldb/dist/include/lldb/Target/Thread.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/Thread.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/Thread.h Sat Jul 1 13:24:58 2017 (r320543) @@ -21,11 +21,11 @@ // Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Event.h" -#include "lldb/Core/StructuredData.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/RegisterCheckpoint.h" #include "lldb/Target/StackFrameList.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ThreadPlanPython.h Sat Jul 1 13:24:58 2017 (r320543) @@ -17,13 +17,13 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StructuredData.h" #include "lldb/Target/Process.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanTracer.h" +#include "lldb/Utility/StructuredData.h" #include "lldb/Utility/UserID.h" #include "lldb/lldb-private.h" Modified: vendor/lldb/dist/include/lldb/Target/ThreadSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadSpec.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Target/ThreadSpec.h Sat Jul 1 13:24:58 2017 (r320543) @@ -10,13 +10,9 @@ #ifndef liblldb_ThreadSpec_h_ #define liblldb_ThreadSpec_h_ -// C Includes -// C++ Includes -#include - -// Other libraries and framework includes -// Project includes +#include "lldb/Utility/StructuredData.h" #include "lldb/lldb-private.h" +#include namespace lldb_private { Added: vendor/lldb/dist/include/lldb/Utility/Connection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/Connection.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,212 @@ +//===-- Connection.h --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Connection_h_ +#define liblldb_Connection_h_ + +#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN +#include "lldb/lldb-enumerations.h" // for ConnectionStatus +#include "lldb/lldb-forward.h" // for IOObjectSP + +#include "llvm/ADT/StringRef.h" // for StringRef + +#include // for micro +#include + +#include // for size_t + +namespace lldb_private { +class Status; +} +namespace lldb_private { +template class Timeout; +} + +namespace lldb_private { + +//---------------------------------------------------------------------- +/// @class Connection Connection.h "lldb/Utility/Connection.h" +/// @brief A communication connection class. +/// +/// A class that implements that actual communication functions for +/// connecting/disconnecting, reading/writing, and waiting for bytes +/// to become available from a two way communication connection. +/// +/// This class is designed to only do very simple communication +/// functions. Instances can be instantiated and given to a +/// Communication class to perform communications where clients can +/// listen for broadcasts, and perform other higher level communications. +//---------------------------------------------------------------------- +class Connection { +public: + //------------------------------------------------------------------ + /// Default constructor + //------------------------------------------------------------------ + Connection() = default; + + //------------------------------------------------------------------ + /// Virtual destructor since this class gets subclassed and handed + /// to a Communication object. + //------------------------------------------------------------------ + virtual ~Connection(); + + //------------------------------------------------------------------ + /// Connect using the connect string \a url. + /// + /// @param[in] url + /// A string that contains all information needed by the + /// subclass to connect to another client. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns false. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// \b True if the connect succeeded, \b false otherwise. The + /// internal error object should be filled in with an + /// appropriate value based on the result of this function. + /// + /// @see Status& Communication::GetError (); + //------------------------------------------------------------------ + virtual lldb::ConnectionStatus Connect(llvm::StringRef url, + Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Disconnect the communications connection if one is currently + /// connected. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns false. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// \b True if the disconnect succeeded, \b false otherwise. The + /// internal error object should be filled in with an + /// appropriate value based on the result of this function. + /// + /// @see Status& Communication::GetError (); + //------------------------------------------------------------------ + virtual lldb::ConnectionStatus Disconnect(Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Check if the connection is valid. + /// + /// @return + /// \b True if this object is currently connected, \b false + /// otherwise. + //------------------------------------------------------------------ + virtual bool IsConnected() const = 0; + + //------------------------------------------------------------------ + /// The read function that attempts to read from the connection. + /// + /// @param[in] dst + /// A destination buffer that must be at least \a dst_len bytes + /// long. + /// + /// @param[in] dst_len + /// The number of bytes to attempt to read, and also the max + /// number of bytes that can be placed into \a dst. + /// + /// @param[in] timeout + /// The number of microseconds to wait for the data. + /// + /// @param[out] status + /// On return, indicates whether the call was successful or terminated + /// due to some error condition. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns zero. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// The number of bytes actually read. + /// + /// @see size_t Communication::Read (void *, size_t, uint32_t); + //------------------------------------------------------------------ + virtual size_t Read(void *dst, size_t dst_len, + const Timeout &timeout, + lldb::ConnectionStatus &status, Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// The actual write function that attempts to write to the + /// communications protocol. + /// + /// Subclasses must override this function. + /// + /// @param[in] dst + /// A desination buffer that must be at least \a dst_len bytes + /// long. + /// + /// @param[in] dst_len + /// The number of bytes to attempt to write, and also the + /// number of bytes are currently available in \a dst. + /// + /// @param[out] error_ptr + /// A pointer to an error object that should be given an + /// appropriate error value if this method returns zero. This + /// value can be NULL if the error value should be ignored. + /// + /// @return + /// The number of bytes actually Written. + //------------------------------------------------------------------ + virtual size_t Write(const void *dst, size_t dst_len, + lldb::ConnectionStatus &status, Status *error_ptr) = 0; + + //------------------------------------------------------------------ + /// Returns a URI that describes this connection object + /// + /// Subclasses may override this function. + /// + /// @return + /// Returns URI or an empty string if disconnecteds + //------------------------------------------------------------------ + virtual std::string GetURI() = 0; + + //------------------------------------------------------------------ + /// Interrupts an ongoing Read() operation. + /// + /// If there is an ongoing read operation in another thread, this operation + /// return with status == eConnectionStatusInterrupted. Note that if there + /// data waiting to be read and an interrupt request is issued, the Read() + /// function will return the data immediately without processing the + /// interrupt request (which will remain queued for the next Read() + /// operation). + /// + /// @return + /// Returns true is the interrupt request was successful. + //------------------------------------------------------------------ + virtual bool InterruptRead() = 0; + + //------------------------------------------------------------------ + /// Returns the underlying IOObject used by the Connection. + /// + /// The IOObject can be used to wait for data to become available + /// on the connection. If the Connection does not use IOObjects (and + /// hence does not support waiting) this function should return a + /// null pointer. + /// + /// @return + /// The underlying IOObject used for reading. + //------------------------------------------------------------------ + virtual lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); } + +private: + //------------------------------------------------------------------ + // For Connection only + //------------------------------------------------------------------ + DISALLOW_COPY_AND_ASSIGN(Connection); +}; + +} // namespace lldb_private + +#endif // liblldb_Connection_h_ Added: vendor/lldb/dist/include/lldb/Utility/IOObject.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/IOObject.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,56 @@ +//===-- IOObject.h ----------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Host_Common_IOObject_h_ +#define liblldb_Host_Common_IOObject_h_ + +#include +#include +#include + +#include "lldb/lldb-private.h" + +namespace lldb_private { + +class IOObject { +public: + typedef enum { + eFDTypeFile, // Other FD requiring read/write + eFDTypeSocket, // Socket requiring send/recv + } FDType; + + // TODO: On Windows this should be a HANDLE, and wait should use + // WaitForMultipleObjects + typedef int WaitableHandle; + static const WaitableHandle kInvalidHandleValue; + + IOObject(FDType type, bool should_close) + : m_fd_type(type), m_should_close_fd(should_close) {} + virtual ~IOObject(); + + virtual Status Read(void *buf, size_t &num_bytes) = 0; + virtual Status Write(const void *buf, size_t &num_bytes) = 0; + virtual bool IsValid() const = 0; + virtual Status Close() = 0; + + FDType GetFdType() const { return m_fd_type; } + + virtual WaitableHandle GetWaitableHandle() = 0; + +protected: + FDType m_fd_type; + bool m_should_close_fd; // True if this class should close the file descriptor + // when it goes away. + +private: + DISALLOW_COPY_AND_ASSIGN(IOObject); +}; +} // namespace lldb_private + +#endif Modified: vendor/lldb/dist/include/lldb/Utility/JSON.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/JSON.h Sat Jul 1 13:24:50 2017 (r320542) +++ vendor/lldb/dist/include/lldb/Utility/JSON.h Sat Jul 1 13:24:58 2017 (r320543) @@ -269,7 +269,7 @@ class JSONParser : public StringExtractor { (public) EndOfFile }; - JSONParser(const char *cstr); + JSONParser(llvm::StringRef data); int GetEscapedChar(bool &was_escaped); Added: vendor/lldb/dist/include/lldb/Utility/StructuredData.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Utility/StructuredData.h Sat Jul 1 13:24:58 2017 (r320543) @@ -0,0 +1,556 @@ +//===-- StructuredData.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_StructuredData_h_ +#define liblldb_StructuredData_h_ + +#include "llvm/ADT/StringRef.h" + +#include "lldb/Utility/ConstString.h" +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-enumerations.h" // for StructuredDataType + +#include // for assert +#include // for size_t +#include // for uint64_t +#include +#include +#include +#include +#include // for move +#include +#include + +namespace lldb_private { +class Status; +} +namespace lldb_private { +class Stream; +} + +namespace lldb_private { + +//---------------------------------------------------------------------- +/// @class StructuredData StructuredData.h "lldb/Utility/StructuredData.h" +/// @brief A class which can hold structured data +/// +/// The StructuredData class is designed to hold the data from a JSON +/// or plist style file -- a serialized data structure with dictionaries +/// (maps, hashes), arrays, and concrete values like integers, floating +/// point numbers, strings, booleans. +/// +/// StructuredData does not presuppose any knowledge of the schema for +/// the data it is holding; it can parse JSON data, for instance, and +/// other parts of lldb can iterate through the parsed data set to find +/// keys and values that may be present. +//---------------------------------------------------------------------- + +class StructuredData { +public: + class Object; + class Array; + class Integer; + class Float; + class Boolean; + class String; + class Dictionary; + class Generic; + + typedef std::shared_ptr ObjectSP; + typedef std::shared_ptr ArraySP; + typedef std::shared_ptr IntegerSP; + typedef std::shared_ptr FloatSP; + typedef std::shared_ptr BooleanSP; + typedef std::shared_ptr StringSP; + typedef std::shared_ptr DictionarySP; + typedef std::shared_ptr GenericSP; + + class Object : public std::enable_shared_from_this { + public: + Object(lldb::StructuredDataType t = lldb::eStructuredDataTypeInvalid) + : m_type(t) {} + + virtual ~Object() = default; + + virtual bool IsValid() const { return true; } + + virtual void Clear() { m_type = lldb::eStructuredDataTypeInvalid; } + + lldb::StructuredDataType GetType() const { return m_type; } + + void SetType(lldb::StructuredDataType t) { m_type = t; } + + Array *GetAsArray() { + return ((m_type == lldb::eStructuredDataTypeArray) + ? static_cast(this) + : nullptr); + } + + Dictionary *GetAsDictionary() { + return ((m_type == lldb::eStructuredDataTypeDictionary) + ? static_cast(this) + : nullptr); + } + + Integer *GetAsInteger() { + return ((m_type == lldb::eStructuredDataTypeInteger) + ? static_cast(this) + : nullptr); + } + + uint64_t GetIntegerValue(uint64_t fail_value = 0) { + Integer *integer = GetAsInteger(); + return ((integer != nullptr) ? integer->GetValue() : fail_value); + } + + Float *GetAsFloat() { + return ((m_type == lldb::eStructuredDataTypeFloat) + ? static_cast(this) + : nullptr); + } + + double GetFloatValue(double fail_value = 0.0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***