summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2018-03-31 11:38:43 +0000
committerdim <dim@FreeBSD.org>2018-03-31 11:38:43 +0000
commit6cd0d336d6427448ee7e76d16538cd3420c27526 (patch)
treebbfa78eb141da26e78f971336f95d96498c0c0aa /usr.bin
parent58aade42438a9c7794958e4f3e7a1e249edba68e (diff)
downloadFreeBSD-src-6cd0d336d6427448ee7e76d16538cd3420c27526.zip
FreeBSD-src-6cd0d336d6427448ee7e76d16538cd3420c27526.tar.gz
Merge clang, llvm, lld, lldb, compiler-rt and libc++ 6.0.0 release, and
several follow-up fixes. MFC r327952: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r321788). Upstream has branched for the 6.0.0 release, which should be in about 6 weeks. Please report bugs and regressions, so we can get them into the release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. MFC r328010: Pull in r322473 from upstream llvm trunk (by Andrei Elovikov): [LV] Don't call recordVectorLoopValueForInductionCast for newly-created IV from a trunc. Summary: This method is supposed to be called for IVs that have casts in their use-def chains that are completely ignored after vectorization under PSE. However, for truncates of such IVs the same InductionDescriptor is used during creation/widening of both original IV based on PHINode and new IV based on TruncInst. This leads to unintended second call to recordVectorLoopValueForInductionCast with a VectorLoopVal set to the newly created IV for a trunc and causes an assert due to attempt to store new information for already existing entry in the map. This is wrong and should not be done. Fixes PR35773. Reviewers: dorit, Ayal, mssimpso Reviewed By: dorit Subscribers: RKSimon, dim, dcaballe, hsaito, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D41913 This should fix "Vector value already set for part" assertions when building the net/iodine and sysutils/daa2iso ports. Reported by: jbeich PR: 224867, 224868 MFC r328090: Pull in r322623 from upstream llvm trunk (by Andrew V. Tischenko): Allow usage of X86-prefixes as separate instrs. Differential Revision: https://reviews.llvm.org/D42102 This should fix parse errors when x86 prefixes (such as 'lock' and 'rep') are followed by various non-mnemonic tokens, e.g. comments, .byte directives and labels. PR: 224669, 225054 MFC r328091: Revert r327340, as the workaround for rep prefixes followed by .byte directives is no longer needed after r328090. MFC r328141 (by emaste): lld: Fix for ld.lld does not accept "AT" syntax for declaring LMA region AT> lma_region expression allows to specify the memory region for section load address. Should fix [upstream LLVM] PR35684. LLVM review: https://reviews.llvm.org/D41397 Obtained from: LLVM r322359 by George Rimar MFC r328143 (by emaste): lld: Handle parsing AT(ADDR(.foo-bar)). The problem we had with it is that anything inside an AT is an expression, so we failed to parse the section name because of the - in it. Requested by: royger Obtained from: LLVM r322801 by Rafael Espindola MFC r328144 (by emaste): lld: Fix incorrect physical address on self-referencing AT command. When a section placement (AT) command references the section itself, the physical address of the section in the ELF header was calculated incorrectly due to alignment happening right after the location pointer's value was captured. The problem was diagnosed and the first version of the patch written by Erick Reyes. Obtained from: LLVM r322421 by Rafael Espindola MFC r328145: Pull in r322016 from upstream llvm trunk (by Sanjay Patel): [ValueTracking] remove overzealous assert The test is derived from a failing fuzz test: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5008 Credit to @rksimon for pointing out the problem. This should fix "Bad flavor while matching min/max" errors when building the graphics/libsixel and science/kst2 ports. Reported by: jbeich PR: 225268, 225269 MFC r328146: Pull in r322106 from upstream llvm trunk (by Alexey Bataev): [COST]Fix PR35865: Fix cost model evaluation for shuffle on X86. Summary: If the vector type is transformed to non-vector single type, the compile may crash trying to get vector information about non-vector type. Reviewers: RKSimon, spatel, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41862 This should fix "Not a vector MVT!" errors when building the games/dhewm3 port. Reported by: jbeich PR: 225271 MFC r328286 (by emaste): lld: Don't mark a shared library as needed because of a lazy symbol. Obtained from: LLVM r323221 by Rafael Esp?ndola MFC r328381: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r323338). PR: 224669 MFC r328513: Pull in r322245 from upstream clang trunk (by Craig Topper): [X86] Make -mavx512f imply -mfma and -mf16c in the frontend like it does in the backend. Similarly, make -mno-fma and -mno-f16c imply -mno-avx512f. Withou this "-mno-sse -mavx512f" ends up with avx512f being enabled in the frontend but disabled in the backend. Reported by: pawel PR: 225488 MFC r328542 (by emaste): lld: Use lookup instead of find. NFC, just simpler. Obtained from: LLVM r323395 by Rafael Espindola MFC r328543 (by emaste): lld: Only lookup LMARegion once. NFC. This is similar to how we handle MemRegion. Obtained from: LLVM r323396 by Rafael Espindola MFC r328544 (by emaste): lld: Remove MemRegionOffset. NFC. We can just use a member variable in MemoryRegion. Obtained from: LLVM r323399 by Rafael Espindola MFC r328545 (by emaste): lld: Simplify. NFC. Obtained from: LLVM r323440 by Rafael Espindola MFC r328546 (by emaste): lld: Improve LMARegion handling. This fixes the crash reported at [LLVM] PR36083. The issue is that we were trying to put all the sections in the same PT_LOAD and crashing trying to write past the end of the file. This also adds accounting for used space in LMARegion, without it all 3 PT_LOADs would have the same physical address. Obtained from: LLVM r323449 by Rafael Espindola MFC r328547 (by emaste): lld: Move LMAOffset from the OutputSection to the PhdrEntry. NFC. If two sections are in the same PT_LOAD, their relatives offsets, virtual address and physical addresses are all the same. [Rafael] initially wanted to have a single global LMAOffset, on the assumption that every ELF file was in practiced loaded contiguously in both physical and virtual memory. Unfortunately that is not the case. The linux kernel has: LOAD 0x200000 0xffffffff81000000 0x0000000001000000 0xced000 0xced000 R E 0x200000 LOAD 0x1000000 0xffffffff81e00000 0x0000000001e00000 0x15f000 0x15f000 RW 0x200000 LOAD 0x1200000 0x0000000000000000 0x0000000001f5f000 0x01b198 0x01b198 RW 0x200000 LOAD 0x137b000 0xffffffff81f7b000 0x0000000001f7b000 0x116000 0x1ec000 RWE 0x200000 The delta for all but the third PT_LOAD is the same: 0xffffffff80000000. [Rafael] thinks the 3rd one is a hack for implementing per cpu data, but we can't break that. Obtained from: LLVM r323456 by Rafael Espindola MFC r328548 (by emaste): lld: Put the header in the first PT_LOAD even if that PT_LOAD has a LMAExpr The root problem is that we were creating a PT_LOAD just for the header. That was technically valid, but inconvenient: we should not be making the ELF discontinuous. The solution is to allow a section with LMAExpr to be added to a PT_LOAD if that PT_LOAD doesn't already have a LMAExpr. LLVM PR: 36017 Obtained from: LLVM r323625 by Rafael Espindola MFC r328594 (by emaste): Pull in r322108 from upstream llvm trunk (by Rafael Esp?ndola): Make one of the emitFill methods non virtual. NFC. This is just preparatory work to fix [LLVM] PR35858. MFC r328595 (by emaste): Pull in r322123 from upstream llvm trunk (by Rafael Esp?ndola): Don't create MCFillFragment directly. Instead use higher level APIs that take care of most bookkeeping. MFC r328596 (by emaste): Pull in r322131 from upstream llvm trunk (by Rafael Esp?ndola): Use a MCExpr for the size of MCFillFragment. This allows the size to be found during ralaxation. This fixes [LLVM] pr35858. Requested by: royger MFC r328753: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r323948). PR: 224669 MFC r328817: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r324090). This introduces retpoline support, with the -mretpoline flag. The upstream initial commit message (r323155 by Chandler Carruth) contains quite a bit of explanation. Quoting: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre. Summary: First, we need to explain the core of the vulnerability. Note that this is a very incomplete description, please see the Project Zero blog post for details: https://googleprojectzero.blogspot.com/2018/01/reading-privileged-memory-with-side.html The basis for branch target injection is to direct speculative execution of the processor to some "gadget" of executable code by poisoning the prediction of indirect branches with the address of that gadget. The gadget in turn contains an operation that provides a side channel for reading data. Most commonly, this will look like a load of secret data followed by a branch on the loaded value and then a load of some predictable cache line. The attacker then uses timing of the processors cache to determine which direction the branch took *in the speculative execution*, and in turn what one bit of the loaded value was. Due to the nature of these timing side channels and the branch predictor on Intel processors, this allows an attacker to leak data only accessible to a privileged domain (like the kernel) back into an unprivileged domain. The goal is simple: avoid generating code which contains an indirect branch that could have its prediction poisoned by an attacker. In many cases, the compiler can simply use directed conditional branches and a small search tree. LLVM already has support for lowering switches in this way and the first step of this patch is to disable jump-table lowering of switches and introduce a pass to rewrite explicit indirectbr sequences into a switch over integers. However, there is no fully general alternative to indirect calls. We introduce a new construct we call a "retpoline" to implement indirect calls in a non-speculatable way. It can be thought of loosely as a trampoline for indirect calls which uses the RET instruction on x86. Further, we arrange for a specific call->ret sequence which ensures the processor predicts the return to go to a controlled, known location. The retpoline then "smashes" the return address pushed onto the stack by the call with the desired target of the original indirect call. The result is a predicted return to the next instruction after a call (which can be used to trap speculative execution within an infinite loop) and an actual indirect branch to an arbitrary address. On 64-bit x86 ABIs, this is especially easily done in the compiler by using a guaranteed scratch register to pass the target into this device. For 32-bit ABIs there isn't a guaranteed scratch register and so several different retpoline variants are introduced to use a scratch register if one is available in the calling convention and to otherwise use direct stack push/pop sequences to pass the target address. This "retpoline" mitigation is fully described in the following blog post: https://support.google.com/faqs/answer/7625886 We also support a target feature that disables emission of the retpoline thunk by the compiler to allow for custom thunks if users want them. These are particularly useful in environments like kernels that routinely do hot-patching on boot and want to hot-patch their thunk to different code sequences. They can write this custom thunk and use `-mretpoline-external-thunk` *in addition* to `-mretpoline`. In this case, on x86-64 thu thunk names must be: ``` __llvm_external_retpoline_r11 ``` or on 32-bit: ``` __llvm_external_retpoline_eax __llvm_external_retpoline_ecx __llvm_external_retpoline_edx __llvm_external_retpoline_push ``` And the target of the retpoline is passed in the named register, or in the case of the `push` suffix on the top of the stack via a `pushl` instruction. There is one other important source of indirect branches in x86 ELF binaries: the PLT. These patches also include support for LLD to generate PLT entries that perform a retpoline-style indirection. The only other indirect branches remaining that we are aware of are from precompiled runtimes (such as crt0.o and similar). The ones we have found are not really attackable, and so we have not focused on them here, but eventually these runtimes should also be replicated for retpoline-ed configurations for completeness. For kernels or other freestanding or fully static executables, the compiler switch `-mretpoline` is sufficient to fully mitigate this particular attack. For dynamic executables, you must compile *all* libraries with `-mretpoline` and additionally link the dynamic executable and all shared libraries with LLD and pass `-z retpolineplt` (or use similar functionality from some other linker). We strongly recommend also using `-z now` as non-lazy binding allows the retpoline-mitigated PLT to be substantially smaller. When manually apply similar transformations to `-mretpoline` to the Linux kernel we observed very small performance hits to applications running typic al workloads, and relatively minor hits (approximately 2%) even for extremely syscall-heavy applications. This is largely due to the small number of indirect branches that occur in performance sensitive paths of the kernel. When using these patches on statically linked applications, especially C++ applications, you should expect to see a much more dramatic performance hit. For microbenchmarks that are switch, indirect-, or virtual-call heavy we have seen overheads ranging from 10% to 50%. However, real-world workloads exhibit substantially lower performance impact. Notably, techniques such as PGO and ThinLTO dramatically reduce the impact of hot indirect calls (by speculatively promoting them to direct calls) and allow optimized search trees to be used to lower switches. If you need to deploy these techniques in C++ applications, we *strongly* recommend that you ensure all hot call targets are statically linked (avoiding PLT indirection) and use both PGO and ThinLTO. Well tuned servers using all of these techniques saw 5% - 10% overhead from the use of retpoline. We will add detailed documentation covering these components in subsequent patches, but wanted to make the core functionality available as soon as possible. Happy for more code review, but we'd really like to get these patches landed and backported ASAP for obvious reasons. We're planning to backport this to both 6.0 and 5.0 release streams and get a 5.0 release with just this cherry picked ASAP for distros and vendors. This patch is the work of a number of people over the past month: Eric, Reid, Rui, and myself. I'm mailing it out as a single commit due to the time sensitive nature of landing this and the need to backport it. Huge thanks to everyone who helped out here, and everyone at Intel who helped out in discussions about how to craft this. Also, credit goes to Paul Turner (at Google, but not an LLVM contributor) for much of the underlying retpoline design. Reviewers: echristo, rnk, ruiu, craig.topper, DavidKreitzer Subscribers: sanjoy, emaste, mcrosier, mgorny, mehdi_amini, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D41723 PR: 224669 MFC r329033: Pull in r324594 from upstream clang trunk (by Alexander Ivchenko): Fix for #31362 - ms_abi is implemented incorrectly for values >=16 bytes. Summary: This patch is a fix for following issue: https://bugs.llvm.org/show_bug.cgi?id=31362 The problem was caused by front end lowering C calling conventions without taking into account calling conventions enforced by attribute. In this case win64cc was no correctly lowered on targets other than Windows. Reviewed By: rnk (Reid Kleckner) Differential Revision: https://reviews.llvm.org/D43016 Author: belickim <mateusz.belicki@intel.com> This fixes clang 6.0.0 assertions when building the emulators/wine and emulators/wine-devel ports, and should also make it use the correct Windows calling conventions. Bump __FreeBSD_version to make the fix easy to detect. PR: 224863 MFC r329223: Pull in r323998 from upstream clang trunk (by Richard Smith): PR36157: When injecting an implicit function declaration in C89, find the right DeclContext rather than injecting it wherever we happen to be. This avoids creating functions whose DeclContext is a struct or similar. This fixes assertion failures when parsing certain not-completely-valid struct declarations. Reported by: ae PR: 225862 MFC r329410: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r325330). PR: 224669 MFC r329983: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 (branches/release_60 r325932). This corresponds to 6.0.0 rc3. PR: 224669 MFC r330384: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 release (upstream r326565). Release notes for llvm, clang and lld will be available here soon: <http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html> <http://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/6.0.0/tools/lld/docs/ReleaseNotes.html> Relnotes: yes PR: 224669 MFC r330686: Pull in r326882 from upstream llvm trunk (by Sjoerd Meijer): [ARM] Fix for PR36577 Don't PerformSHLSimplify if the given node is used by a node that also uses a constant because we may get stuck in an infinite combine loop. bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36577 Patch by Sam Parker. Differential Revision: https://reviews.llvm.org/D44097 This fixes a hang when compiling one particular file in java/openjdk8 for armv6 and armv7. Reported by: swills PR: 226388 MFC r331065: Pull in r327638 from upstream llvm trunk (by Matthew Simpson): [ConstantFolding, InstSimplify] Handle more vector GEPs This patch addresses some additional cases where the compiler crashes upon encountering vector GEPs. This should fix PR36116. Differential Revision: https://reviews.llvm.org/D44219 Reference: https://bugs.llvm.org/show_bug.cgi?id=36116 This fixes an assertion when building the emulators/snes9x port. Reported by: jbeich PR: 225471 MFC r331066: Pull in r321999 from upstream clang trunk (by Ivan A. Kosarev): [CodeGen] Fix TBAA info for accesses to members of base classes Resolves: Bug 35724 - regression (r315984): fatal error: error in backend: Broken function found (Did not see access type in access path!) https://bugs.llvm.org/show_bug.cgi?id=35724 Differential Revision: https://reviews.llvm.org/D41547 This fixes "Did not see access type in access path" fatal errors when building the devel/gdb port (version 8.1). Reported by: jbeich PR: 226658 MFC r331366: Pull in r327101 from upstream llvm trunk (by Rafael Espindola): Don't treat .symver as a regular alias definition. This patch starts simplifying the handling of .symver. For now it just moves the responsibility for creating an alias down to the streamer. With that the asm streamer can pass a .symver unchanged, which is nice since gas cannot parse "foo@bar = zed". In a followup I hope to move the handling down to the writer so that we don't need special hacks for avoiding breaking names with @@@ on windows. Pull in r327160 from upstream llvm trunk (by Rafael Espindola): Delay creating an alias for @@@. With this we only create an alias for @@@ once we know if it should use @ or @@. This avoids last minutes renames and hacks to handle MS names. This only handles the ELF writer. LTO still has issues with @@@ aliases. Pull in r327928 from upstream llvm trunk (by Vitaly Buka): Object: Move attribute calculation into RecordStreamer. NFC Summary: Preparation for D44274 Reviewers: pcc, espindola Subscribers: hiraditya Differential Revision: https://reviews.llvm.org/D44276 Pull in r327930 from upstream llvm trunk (by Vitaly Buka): Object: Fix handling of @@@ in .symver directive Summary: name@@@nodename is going to be replaced with name@@nodename if symbols is defined in the assembled file, or name@nodename if undefined. https://sourceware.org/binutils/docs/as/Symver.html Fixes PR36623 Reviewers: pcc, espindola Subscribers: mehdi_amini, hiraditya Differential Revision: https://reviews.llvm.org/D44274 Together, these changes fix handling of @@@ in .symver directives when doing Link Time Optimization. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC r331731: Pull in r328738 from upstream lld trunk (by Rafael Espindola): Strip @VER suffices from the LTO output. This fixes pr36623. The problem is that we have to parse versions out of names before LTO so that LTO can use that information. When we get the LTO produced .o files, we replace the previous symbols with the LTO produced ones, but they still have @ in their names. We could just trim the name directly, but calling parseSymbolVersion to do it is simpler. This is a follow-up to r331366, since we discovered that lld could append version strings to symbols twice, when using Link Time Optimization.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/clang/Makefile1
-rw-r--r--usr.bin/clang/bugpoint/bugpoint.124
-rw-r--r--usr.bin/clang/clang-tblgen/Makefile1
-rw-r--r--usr.bin/clang/clang/clang.193
-rw-r--r--usr.bin/clang/llc/llc.113
-rw-r--r--usr.bin/clang/lld/Makefile13
-rw-r--r--usr.bin/clang/lli/lli.14
-rw-r--r--usr.bin/clang/llvm-ar/llvm-ar.14
-rw-r--r--usr.bin/clang/llvm-as/Makefile2
-rw-r--r--usr.bin/clang/llvm-as/llvm-as.110
-rw-r--r--usr.bin/clang/llvm-bcanalyzer/Makefile2
-rw-r--r--usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.16
-rw-r--r--usr.bin/clang/llvm-cov/llvm-cov.1136
-rw-r--r--usr.bin/clang/llvm-cxxdump/Makefile2
-rw-r--r--usr.bin/clang/llvm-cxxfilt/Makefile2
-rw-r--r--usr.bin/clang/llvm-diff/Makefile2
-rw-r--r--usr.bin/clang/llvm-diff/llvm-diff.14
-rw-r--r--usr.bin/clang/llvm-dis/llvm-dis.14
-rw-r--r--usr.bin/clang/llvm-dwarfdump/Makefile1
-rw-r--r--usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1153
-rw-r--r--usr.bin/clang/llvm-extract/llvm-extract.14
-rw-r--r--usr.bin/clang/llvm-link/Makefile2
-rw-r--r--usr.bin/clang/llvm-link/llvm-link.14
-rw-r--r--usr.bin/clang/llvm-modextract/Makefile2
-rw-r--r--usr.bin/clang/llvm-nm/llvm-nm.117
-rw-r--r--usr.bin/clang/llvm-objcopy/Makefile10
-rw-r--r--usr.bin/clang/llvm-pdbutil/Makefile2
-rw-r--r--usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1745
-rw-r--r--usr.bin/clang/llvm-profdata/llvm-profdata.148
-rw-r--r--usr.bin/clang/llvm-symbolizer/llvm-symbolizer.14
-rw-r--r--usr.bin/clang/llvm-tblgen/Makefile5
-rw-r--r--usr.bin/clang/opt/opt.116
32 files changed, 1200 insertions, 136 deletions
diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile
index c52c342..ece5e14 100644
--- a/usr.bin/clang/Makefile
+++ b/usr.bin/clang/Makefile
@@ -28,6 +28,7 @@ SUBDIR+= llvm-lto2
SUBDIR+= llvm-mc
SUBDIR+= llvm-modextract
SUBDIR+= llvm-nm
+SUBDIR+= llvm-objcopy
SUBDIR+= llvm-objdump
SUBDIR+= llvm-pdbutil
SUBDIR+= llvm-profdata
diff --git a/usr.bin/clang/bugpoint/bugpoint.1 b/usr.bin/clang/bugpoint/bugpoint.1
index 36b0aed..cc93a97 100644
--- a/usr.bin/clang/bugpoint/bugpoint.1
+++ b/usr.bin/clang/bugpoint/bugpoint.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "BUGPOINT" "1" "2016-03-03" "3.8" "LLVM"
+.TH "BUGPOINT" "1" "2017-12-24" "6" "LLVM"
.SH NAME
bugpoint \- automatic test case reduction tool
.
@@ -42,7 +42,7 @@ can be used to debug three types of failures: optimizer crashes, miscompilations
by optimizers, or bad native code generation (including problems in the static
and JIT compilers). It aims to reduce large test cases to small, useful ones.
For more information on the design and inner workings of \fBbugpoint\fP, as well as
-advice for using bugpoint, see \fIllvm/docs/Bugpoint.html\fP in the LLVM
+advice for using bugpoint, see /Bugpoint in the LLVM
distribution.
.SH OPTIONS
.sp
@@ -248,7 +248,12 @@ be useful for cross\-compilation.
.INDENT 0.0
.INDENT 3.5
This option defines the command to use with the \fB\-\-compile\-custom\fP
-option to compile the bitcode testcase. This can be useful for
+option to compile the bitcode testcase. The command should exit with a
+failure exit code if the file is "interesting" and should exit with a
+success exit code (i.e. 0) otherwise (this is the same as if it crashed on
+"interesting" inputs).
+.sp
+This can be useful for
testing compiler output without running any link or execute stages. To
generate a reduced unit test, you may add CHECK directives to the
testcase and pass the name of an executable compile\-command script in this form:
@@ -278,6 +283,17 @@ This option defines the path to the command to execute with the
option.
.UNINDENT
.UNINDENT
+.sp
+\fB\-\-verbose\-errors\fP=\fI{true,false}\fP
+.INDENT 0.0
+.INDENT 3.5
+The default behavior of bugpoint is to print "<crash>" when it finds a reduced
+test that crashes compilation. This flag prints the output of the crashing
+program to stderr. This is useful to make sure it is the same error being
+tracked down and not a different error that happens to crash the compiler as
+well. Defaults to false.
+.UNINDENT
+.UNINDENT
.SH EXIT STATUS
.sp
If \fBbugpoint\fP succeeds in finding a problem, it will exit with 0. Otherwise,
@@ -288,6 +304,6 @@ opt|opt
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/clang-tblgen/Makefile b/usr.bin/clang/clang-tblgen/Makefile
index b341aa2..9fed46f 100644
--- a/usr.bin/clang/clang-tblgen/Makefile
+++ b/usr.bin/clang/clang-tblgen/Makefile
@@ -9,6 +9,7 @@ SRCS+= ClangAttrEmitter.cpp
SRCS+= ClangCommentCommandInfoEmitter.cpp
SRCS+= ClangCommentHTMLNamedCharacterReferenceEmitter.cpp
SRCS+= ClangCommentHTMLTagsEmitter.cpp
+SRCS+= ClangDataCollectorsEmitter.cpp
SRCS+= ClangDiagnosticsEmitter.cpp
SRCS+= ClangOptionDocEmitter.cpp
SRCS+= ClangSACheckersEmitter.cpp
diff --git a/usr.bin/clang/clang/clang.1 b/usr.bin/clang/clang/clang.1
index 5fcc9ac..83bb0d7 100644
--- a/usr.bin/clang/clang/clang.1
+++ b/usr.bin/clang/clang/clang.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "CLANG" "1" "March 04, 2016" "3.8" "Clang"
+.TH "CLANG" "1" "Dec 24, 2017" "6" "Clang"
.SH NAME
clang \- the Clang C, C++, and Objective-C compiler
.
@@ -135,7 +135,13 @@ Specify the language standard to compile for.
.TP
.B \-stdlib=<library>
Specify the C++ standard library to use; supported options are libstdc++ and
-libc++.
+libc++. If not specified, platform default will be used.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-rtlib=<library>
+Specify the compiler runtime library to use; supported options are libgcc and
+compiler\-rt. If not specified, platform default will be used.
.UNINDENT
.INDENT 0.0
.TP
@@ -207,18 +213,6 @@ Enable the "Blocks" language feature.
.UNINDENT
.INDENT 0.0
.TP
-.B \-fobjc\-gc\-only
-Indicate that Objective\-C code should be compiled in GC\-only mode, which only
-works when Objective\-C Garbage Collection is enabled.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-fobjc\-gc
-Indicate that Objective\-C code should be compiled in hybrid\-GC mode, which
-works with both GC and non\-GC mode.
-.UNINDENT
-.INDENT 0.0
-.TP
.B \-fobjc\-abi\-version=version
Select the Objective\-C ABI version to use. Available versions are 1 (legacy
"fragile" ABI), 2 (non\-fragile ABI 1), and 3 (non\-fragile ABI 2).
@@ -233,9 +227,9 @@ default).
.UNINDENT
.INDENT 0.0
.TP
-.B \-fobjc\-nonfragile\-abi
+.B \-fobjc\-nonfragile\-abi, \-fno\-objc\-nonfragile\-abi
Enable use of the Objective\-C non\-fragile ABI. On platforms for which this is
-the default ABI, it can be disabled with \fB\-fno\-objc\-nonfragile\-abi\fP\&.
+the default ABI, it can be disabled with \fI\%\-fno\-objc\-nonfragile\-abi\fP\&.
.UNINDENT
.SS Target Selection Options
.sp
@@ -270,7 +264,7 @@ but which may not exist on earlier ones.
.SS Code Generation Options
.INDENT 0.0
.TP
-.B \-O0, \-O1, \-O2, \-O3, \-Ofast, \-Os, \-Oz, \-O, \-O4
+.B \-O0, \-O1, \-O2, \-O3, \-Ofast, \-Os, \-Oz, \-Og, \-O, \-O4
Specify which optimization level to use:
.INDENT 7.0
.INDENT 3.5
@@ -296,6 +290,9 @@ size.
\fI\%\-Oz\fP Like \fI\%\-Os\fP (and thus \fI\%\-O2\fP), but reduces code
size further.
.sp
+\fI\%\-Og\fP Like \fI\%\-O1\fP\&. In future versions, this option might
+disable different optimizations in order to improve debuggability.
+.sp
\fI\%\-O\fP Equivalent to \fI\%\-O2\fP\&.
.sp
\fI\%\-O4\fP and higher
@@ -309,21 +306,33 @@ Currently equivalent to \fI\%\-O3\fP
.UNINDENT
.INDENT 0.0
.TP
-.B \-g
-Generate debug information. Note that Clang debug information works best at \-O0.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-gmodules
-Generate debug information that contains external references to
-types defined in clang modules or precompiled headers instead of
-emitting redundant debug type information into every object file.
-This option implies \fB\-fmodule\-format=obj\fP\&.
+.B \-g, \-gline\-tables\-only, \-gmodules
+Control debug information output. Note that Clang debug information works
+best at \fI\%\-O0\fP\&. When more than one option starting with \fI\-g\fP is
+specified, the last one wins:
+.INDENT 7.0
+.INDENT 3.5
+\fB\-g\fP Generate debug information.
+.sp
+\fB\-gline\-tables\-only\fP Generate only line table debug information. This
+allows for symbolicated backtraces with inlining information, but does not
+include any information about variables, their locations or types.
+.sp
+\fI\%\-gmodules\fP Generate debug information that contains external
+references to types defined in Clang modules or precompiled headers instead
+of emitting redundant debug type information into every object file. This
+option transparently switches the Clang module format to object file
+containers that hold the Clang module together with the debug information.
+When compiling a program that uses Clang modules or precompiled headers,
+this option produces complete debug information with faster compile
+times and much smaller object files.
.sp
This option should not be used when building static libraries for
distribution to other machines because the debug info will contain
-references to the module cache on the machine the object files in
-the library were built on.
+references to the module cache on the machine the object files in the
+library were built on.
+.UNINDENT
+.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
@@ -362,9 +371,9 @@ This flag sets the default visibility level.
.UNINDENT
.INDENT 0.0
.TP
-.B \-fcommon
+.B \-fcommon, \-fno\-common
This flag specifies that variables without initializers get common linkage.
-It can be disabled with \fB\-fno\-common\fP\&.
+It can be disabled with \fI\%\-fno\-common\fP\&.
.UNINDENT
.INDENT 0.0
.TP
@@ -377,11 +386,17 @@ to choose a more efficient model if possible.
.UNINDENT
.INDENT 0.0
.TP
-.B \-flto, \-emit\-llvm
+.B \-flto, \-flto=full, \-flto=thin, \-emit\-llvm
Generate output files in LLVM formats, suitable for link time optimization.
When used with \fI\%\-S\fP this generates LLVM intermediate language
assembly files, otherwise this generates LLVM bitcode format object files
(which may be passed to the linker depending on the stage selection options).
+.sp
+The default for \fI\%\-flto\fP is "full", in which the
+LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where
+the linker merges all such modules into a single combined module for
+optimization. With "thin", ThinLTO
+compilation is invoked instead.
.UNINDENT
.SS Driver Options
.INDENT 0.0
@@ -447,7 +462,8 @@ Print the full library path of file.
.INDENT 0.0
.TP
.B \-print\-libgcc\-file\-name
-Print the library path for "libgcc.a".
+Print the library path for the currently used compiler runtime library
+("libgcc.a" or "libclang_rt.builtins.*.a").
.UNINDENT
.INDENT 0.0
.TP
@@ -466,6 +482,13 @@ Save intermediate compilation results.
.UNINDENT
.INDENT 0.0
.TP
+.B \-save\-stats, \-save\-stats=cwd, \-save\-stats=obj
+Save internal code generation (LLVM) statistics to a file in the current
+directory (\fI\%\-save\-stats\fP/"\-save\-stats=cwd") or the directory
+of the output file ("\-save\-state=obj").
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-integrated\-as, \-no\-integrated\-as
Used to enable and disable, respectively, the use of the integrated
assembler. Whether the integrated assembler is on by default is target
@@ -575,10 +598,10 @@ include preprocessed source files (use the \fI\%\-E\fP option) and the full
output of the compiler, along with information to reproduce.
.SH SEE ALSO
.sp
-\fIas(1)\fP, \fIld(1)\fP
+\fBas(1)\fP, \fBld(1)\fP
.SH AUTHOR
Maintained by the Clang / LLVM Team (<http://clang.llvm.org>)
.SH COPYRIGHT
-2007-2016, The Clang Team
+2007-2017, The Clang Team
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llc/llc.1 b/usr.bin/clang/llc/llc.1
index 1ec01b7..aff09c1 100644
--- a/usr.bin/clang/llc/llc.1
+++ b/usr.bin/clang/llc/llc.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLC" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLC" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llc \- LLVM static compiler
.
@@ -182,6 +182,15 @@ the \fB\-march\fP option so that code can be generated for that target.
Specify which EABI version should conform to. Valid EABI versions are \fIgnu\fP,
\fI4\fP and \fI5\fP\&. Default value (\fIdefault\fP) depends on the triple.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-stack\-size\-section
+Emit the .stack_sizes section which contains stack size metadata. The section
+contains an array of pairs of function symbol references (8 byte) and stack
+sizes (unsigned LEB128). The stack size values only include the space allocated
+in the function prologue. Functions with dynamic stack allocations are not
+included.
+.UNINDENT
.SS Tuning/Configuration Options
.INDENT 0.0
.TP
@@ -260,6 +269,6 @@ lli
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile
index d2d0d95..3c795a4 100644
--- a/usr.bin/clang/lld/Makefile
+++ b/usr.bin/clang/lld/Makefile
@@ -19,6 +19,15 @@ CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${OBJTOP}/lib/clang/libllvm
SRCDIR= tools/lld
+SRCS+= Common/Args.cpp
+SRCS+= Common/ErrorHandler.cpp
+SRCS+= Common/Memory.cpp
+SRCS+= Common/Reproduce.cpp
+SRCS+= Common/Strings.cpp
+SRCS+= Common/TargetOptionsCommandFlags.cpp
+SRCS+= Common/Threads.cpp
+SRCS+= Common/Version.cpp
+SRCS+= ELF/AArch64ErrataFix.cpp
SRCS+= ELF/Arch/AArch64.cpp
SRCS+= ELF/Arch/AMDGPU.cpp
SRCS+= ELF/Arch/ARM.cpp
@@ -33,7 +42,6 @@ SRCS+= ELF/Arch/X86_64.cpp
SRCS+= ELF/Driver.cpp
SRCS+= ELF/DriverUtils.cpp
SRCS+= ELF/EhFrame.cpp
-SRCS+= ELF/Error.cpp
SRCS+= ELF/Filesystem.cpp
SRCS+= ELF/GdbIndex.cpp
SRCS+= ELF/ICF.cpp
@@ -54,15 +62,12 @@ SRCS+= ELF/SyntheticSections.cpp
SRCS+= ELF/Target.cpp
SRCS+= ELF/Thunks.cpp
SRCS+= ELF/Writer.cpp
-SRCS+= lib/Config/Version.cpp
SRCS+= lib/Core/Error.cpp
SRCS+= lib/Core/File.cpp
SRCS+= lib/Core/LinkingContext.cpp
SRCS+= lib/Core/Reader.cpp
-SRCS+= lib/Core/Reproduce.cpp
SRCS+= lib/Core/Resolver.cpp
SRCS+= lib/Core/SymbolTable.cpp
-SRCS+= lib/Core/TargetOptionsCommandFlags.cpp
SRCS+= tools/lld/lld.cpp
.include "${SRCTOP}/lib/clang/llvm.build.mk"
diff --git a/usr.bin/clang/lli/lli.1 b/usr.bin/clang/lli/lli.1
index 7b805f7..f6687729 100644
--- a/usr.bin/clang/lli/lli.1
+++ b/usr.bin/clang/lli/lli.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLI" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLI" "1" "2017-12-24" "6" "LLVM"
.SH NAME
lli \- directly execute programs from LLVM bitcode
.
@@ -293,6 +293,6 @@ Otherwise, it will return the exit code of the program it executes.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-ar/llvm-ar.1 b/usr.bin/clang/llvm-ar/llvm-ar.1
index 7b7e062..074f1b1 100644
--- a/usr.bin/clang/llvm-ar/llvm-ar.1
+++ b/usr.bin/clang/llvm-ar/llvm-ar.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-AR" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-AR" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-ar \- LLVM archiver
.
@@ -385,6 +385,6 @@ ar(1)
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-as/Makefile b/usr.bin/clang/llvm-as/Makefile
index 02c853e..d60bd49 100644
--- a/usr.bin/clang/llvm-as/Makefile
+++ b/usr.bin/clang/llvm-as/Makefile
@@ -5,6 +5,4 @@ PROG_CXX= llvm-as
SRCDIR= tools/llvm-as
SRCS+= llvm-as.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-as/llvm-as.1 b/usr.bin/clang/llvm-as/llvm-as.1
index bd00ef0..de7d47a 100644
--- a/usr.bin/clang/llvm-as/llvm-as.1
+++ b/usr.bin/clang/llvm-as/llvm-as.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-AS" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-AS" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-as \- LLVM assembler
.
@@ -60,15 +60,15 @@ suffix is appended.
.SH OPTIONS
.INDENT 0.0
.TP
-.B \fB\-f\fP
+\fB\-f\fP
Enable binary output on terminals. Normally, \fBllvm\-as\fP will refuse to
write raw bitcode output if the output stream is a terminal. With this option,
\fBllvm\-as\fP will write raw bitcode regardless of the output device.
.TP
-.B \fB\-help\fP
+\fB\-help\fP
Print a summary of command line options.
.TP
-.B \fB\-o\fP \fIfilename\fP
+\fB\-o\fP \fIfilename\fP
Specify the output file name. If \fIfilename\fP is \fB\-\fP, then \fBllvm\-as\fP
sends its output to standard output.
.UNINDENT
@@ -82,6 +82,6 @@ llvm\-dis|llvm\-dis, gccas|gccas
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-bcanalyzer/Makefile b/usr.bin/clang/llvm-bcanalyzer/Makefile
index 7e87899..1b1c7ad 100644
--- a/usr.bin/clang/llvm-bcanalyzer/Makefile
+++ b/usr.bin/clang/llvm-bcanalyzer/Makefile
@@ -5,6 +5,4 @@ PROG_CXX= llvm-bcanalyzer
SRCDIR= tools/llvm-bcanalyzer
SRCS+= llvm-bcanalyzer.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 b/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
index a88ab88..f8f27b8 100644
--- a/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
+++ b/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-BCANALYZER" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-BCANALYZER" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-bcanalyzer \- LLVM bitcode analyzer
.
@@ -467,10 +467,10 @@ Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.
.UNINDENT
.SH SEE ALSO
.sp
-\fB/CommandGuide/llvm\-dis\fP, \fB/BitCodeFormat\fP
+/CommandGuide/llvm\-dis, /BitCodeFormat
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-cov/llvm-cov.1 b/usr.bin/clang/llvm-cov/llvm-cov.1
index 07c4000..2f573ce 100644
--- a/usr.bin/clang/llvm-cov/llvm-cov.1
+++ b/usr.bin/clang/llvm-cov/llvm-cov.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-COV" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-COV" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-cov \- emit coverage information
.
@@ -52,6 +52,8 @@ be provided.
\fI\%show\fP
.IP \(bu 2
\fI\%report\fP
+.IP \(bu 2
+\fI\%export\fP
.UNINDENT
.SH GCOV COMMAND
.SS SYNOPSIS
@@ -183,12 +185,12 @@ it exits with zero.
.SH SHOW COMMAND
.SS SYNOPSIS
.sp
-\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fISOURCES\fP]
+\fBllvm\-cov show\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP]
.SS DESCRIPTION
.sp
-The \fBllvm\-cov show\fP command shows line by line coverage of a binary
-\fIBIN\fP using the profile data \fIPROFILE\fP\&. It can optionally be filtered to only
-show the coverage for the files listed in \fISOURCES\fP\&.
+The \fBllvm\-cov show\fP command shows line by line coverage of the
+binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be
+filtered to only show the coverage for the files listed in \fISOURCES\fP\&.
.sp
To use \fBllvm\-cov show\fP, you need a program that is compiled with
instrumentation to emit profile and coverage data. To build such a program with
@@ -197,7 +199,7 @@ flags. If linking with the \fBclang\fP driver, pass \fB\-fprofile\-instr\-genera
to the link stage to make sure the necessary runtime libraries are linked in.
.sp
The coverage information is stored in the built executable or library itself,
-and this is what you should pass to \fBllvm\-cov show\fP as the \fIBIN\fP
+and this is what you should pass to \fBllvm\-cov show\fP as a \fIBIN\fP
argument. The profile data is generated by running this instrumented program
normally. When the program exits it will write out a raw profile file,
typically called \fBdefault.profraw\fP, which can be converted to a format that
@@ -207,45 +209,48 @@ tool.
.INDENT 0.0
.TP
.B \-show\-line\-counts
-Show the execution counts for each line. This is enabled by default, unless
-another \fB\-show\fP option is used.
+Show the execution counts for each line. Defaults to true, unless another
+\fB\-show\fP option is used.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-expansions
Expand inclusions, such as preprocessor macros or textual inclusions, inline
-in the display of the source file.
+in the display of the source file. Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-instantiations
For source regions that are instantiated multiple times, such as templates in
\fBC++\fP, show each instantiation separately as well as the combined summary.
+Defaults to true.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-regions
Show the execution counts for each region by displaying a caret that points to
-the character where the region starts.
+the character where the region starts. Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
.B \-show\-line\-counts\-or\-regions
Show the execution counts for each line if there is only one region on the
line, but show the individual regions if there are multiple on the line.
+Defaults to false.
.UNINDENT
.INDENT 0.0
.TP
-.B \-use\-color[=VALUE]
+.B \-use\-color
Enable or disable color output. By default this is autodetected.
.UNINDENT
.INDENT 0.0
.TP
-.B \-arch=<name>
-If the covered binary is a universal binary, select the architecture to use.
-It is an error to specify an architecture that is not included in the
-universal binary or to use an architecture that does not match a
-non\-universal binary.
+.B \-arch=[*NAMES*]
+Specify a list of architectures such that the Nth entry in the list
+corresponds to the Nth specified binary. If the covered object is a universal
+binary, this specifies the architecture to use. It is an error to specify an
+architecture that is not included in the universal binary or to use an
+architecture that does not match a non\-universal binary.
.UNINDENT
.INDENT 0.0
.TP
@@ -254,11 +259,54 @@ Show code coverage only for functions with the given name.
.UNINDENT
.INDENT 0.0
.TP
+.B \-name\-whitelist=<FILE>
+Show code coverage only for functions listed in the given file. Each line in
+the file should start with \fIwhitelist_fun:\fP, immediately followed by the name
+of the function to accept. This name can be a wildcard expression.
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-name\-regex=<PATTERN>
Show code coverage only for functions that match the given regular expression.
.UNINDENT
.INDENT 0.0
.TP
+.B \-format=<FORMAT>
+Use the specified output format. The supported formats are: "text", "html".
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-tab\-size=<TABSIZE>
+Replace tabs with <TABSIZE> spaces when preparing reports. Currently, this is
+only supported for the html format.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-output\-dir=PATH
+Specify a directory to write coverage reports into. If the directory does not
+exist, it is created. When used in function view mode (i.e when \-name or
+\-name\-regex are used to select specific functions), the report is written to
+PATH/functions.EXTENSION. When used in file view mode, a report for each file
+is written to PATH/REL_PATH_TO_FILE.EXTENSION.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-Xdemangler=<TOOL>|<TOOL\-OPTION>
+Specify a symbol demangler. This can be used to make reports more
+human\-readable. This option can be specified multiple times to supply
+arguments to the demangler (e.g \fI\-Xdemangler c++filt \-Xdemangler \-n\fP for C++).
+The demangler is expected to read a newline\-separated list of symbols from
+stdin and write a newline\-separated list of the same length to stdout.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-num\-threads=N, \-j=N
+Use N threads to write file reports (only applicable when \-output\-dir is
+specified). When N=0, llvm\-cov auto\-detects an appropriate number of threads to
+use. This is the default.
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-line\-coverage\-gt=<N>
Show code coverage only for functions with line coverage greater than the
given threshold.
@@ -281,15 +329,22 @@ given threshold.
Show code coverage only for functions with region coverage less than the given
threshold.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-path\-equivalence=<from>,<to>
+Map the paths in the coverage data to local source file paths. This allows you
+to generate the coverage data on one machine, and then use llvm\-cov on a
+different machine where you have the same files on a different path.
+.UNINDENT
.SH REPORT COMMAND
.SS SYNOPSIS
.sp
-\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fISOURCES\fP]
+\fBllvm\-cov report\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]] [\fISOURCES\fP]
.SS DESCRIPTION
.sp
-The \fBllvm\-cov report\fP command displays a summary of the coverage of a
-binary \fIBIN\fP using the profile data \fIPROFILE\fP\&. It can optionally be filtered to
-only show the coverage for the files listed in \fISOURCES\fP\&.
+The \fBllvm\-cov report\fP command displays a summary of the coverage of
+the binaries \fIBIN\fP,... using the profile data \fIPROFILE\fP\&. It can optionally be
+filtered to only show the coverage for the files listed in \fISOURCES\fP\&.
.sp
If no source files are provided, a summary line is printed for each file in the
coverage data. If any files are provided, summaries are shown for each function
@@ -311,9 +366,48 @@ It is an error to specify an architecture that is not included in the
universal binary or to use an architecture that does not match a
non\-universal binary.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-show\-functions
+Show coverage summaries for each function. Defaults to false.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-show\-instantiation\-summary
+Show statistics for all function instantiations. Defaults to false.
+.UNINDENT
+.SH EXPORT COMMAND
+.SS SYNOPSIS
+.sp
+\fBllvm\-cov export\fP [\fIoptions\fP] \-instr\-profile \fIPROFILE\fP \fIBIN\fP [\fI\-object BIN,...\fP] [[\fI\-object BIN\fP]]
+.SS DESCRIPTION
+.sp
+The \fBllvm\-cov export\fP command exports regions, functions, expansions,
+and summaries of the coverage of the binaries \fIBIN\fP,... using the profile data
+\fIPROFILE\fP as JSON.
+.sp
+For information on compiling programs for coverage and generating profile data,
+see \fI\%SHOW COMMAND\fP\&.
+.SS OPTIONS
+.INDENT 0.0
+.TP
+.B \-arch=<name>
+If the covered binary is a universal binary, select the architecture to use.
+It is an error to specify an architecture that is not included in the
+universal binary or to use an architecture that does not match a
+non\-universal binary.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-summary\-only
+Export only summary information for each file in the coverage data. This mode
+will not export coverage information for smaller units such as individual
+functions or regions. The result will be the same as produced by :program:
+\fIllvm\-cov report\fP command, but presented in JSON format rather than text.
+.UNINDENT
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-cxxdump/Makefile b/usr.bin/clang/llvm-cxxdump/Makefile
index 21d0daf..1de6719 100644
--- a/usr.bin/clang/llvm-cxxdump/Makefile
+++ b/usr.bin/clang/llvm-cxxdump/Makefile
@@ -7,6 +7,4 @@ SRCDIR= tools/llvm-cxxdump
SRCS+= Error.cpp
SRCS+= llvm-cxxdump.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile
index dce1c2e..74b1d42 100644
--- a/usr.bin/clang/llvm-cxxfilt/Makefile
+++ b/usr.bin/clang/llvm-cxxfilt/Makefile
@@ -6,6 +6,4 @@ MAN=
SRCDIR= tools/llvm-cxxfilt
SRCS+= llvm-cxxfilt.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-diff/Makefile b/usr.bin/clang/llvm-diff/Makefile
index 4c66785..6879af0 100644
--- a/usr.bin/clang/llvm-diff/Makefile
+++ b/usr.bin/clang/llvm-diff/Makefile
@@ -8,6 +8,4 @@ SRCS+= DiffLog.cpp
SRCS+= DifferenceEngine.cpp
SRCS+= llvm-diff.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-diff/llvm-diff.1 b/usr.bin/clang/llvm-diff/llvm-diff.1
index 9ec9940..b16b1f3 100644
--- a/usr.bin/clang/llvm-diff/llvm-diff.1
+++ b/usr.bin/clang/llvm-diff/llvm-diff.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-DIFF" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-DIFF" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-diff \- LLVM structural 'diff'
.
@@ -72,6 +72,6 @@ massive detected differences in blocks.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-dis/llvm-dis.1 b/usr.bin/clang/llvm-dis/llvm-dis.1
index 2a9566e..89c29b4 100644
--- a/usr.bin/clang/llvm-dis/llvm-dis.1
+++ b/usr.bin/clang/llvm-dis/llvm-dis.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-DIS" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-DIS" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-dis \- LLVM disassembler
.
@@ -83,6 +83,6 @@ llvm\-as|llvm\-as
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-dwarfdump/Makefile b/usr.bin/clang/llvm-dwarfdump/Makefile
index d56bb43..e871d88 100644
--- a/usr.bin/clang/llvm-dwarfdump/Makefile
+++ b/usr.bin/clang/llvm-dwarfdump/Makefile
@@ -3,6 +3,7 @@
PROG_CXX= llvm-dwarfdump
SRCDIR= tools/llvm-dwarfdump
+SRCS+= Statistics.cpp
SRCS+= llvm-dwarfdump.cpp
LIBADD+= z
diff --git a/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 b/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1
index 8e559a2..da744e4 100644
--- a/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1
+++ b/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1
@@ -1,9 +1,9 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-DWARFDUMP" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-DWARFDUMP" "1" "2017-12-24" "6" "LLVM"
.SH NAME
-llvm-dwarfdump \- print contents of DWARF sections
+llvm-dwarfdump \- dump and verify DWARF debug information
.
.nr rst2man-indent-level 0
.
@@ -33,28 +33,157 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
.SH SYNOPSIS
.sp
-\fBllvm\-dwarfdump\fP [\fIoptions\fP] [\fIfilenames...\fP]
+\fBllvm\-dwarfdump\fP [\fIoptions\fP] [\fIfilename ...\fP]
.SH DESCRIPTION
.sp
-\fBllvm\-dwarfdump\fP parses DWARF sections in the object files
-and prints their contents in human\-readable form.
+\fBllvm\-dwarfdump\fP parses DWARF sections in object files,
+archives, and \fI\&.dSYM\fP bundles and prints their contents in
+human\-readable form. Only the .debug_info section is printed unless one of
+the section\-specific options or \fI\%\-\-all\fP is specified.
.SH OPTIONS
.INDENT 0.0
.TP
-.B \-debug\-dump=section
-Specify the DWARF section to dump.
-For example, use \fBabbrev\fP to dump the contents of \fB\&.debug_abbrev\fP section,
-\fBloc.dwo\fP to dump the contents of \fB\&.debug_loc.dwo\fP etc.
-See \fBllvm\-dwarfdump \-\-help\fP for the complete list of supported sections.
-Use \fBall\fP to dump all DWARF sections. It is the default.
+.B \-a, \-\-all
+Disassemble all supported DWARF sections.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-arch=<arch>
+Dump DWARF debug information for the specified CPU architecture.
+Architectures may be specified by name or by number. This
+option can be specified multiple times, once for each desired
+architecture. All CPU architectures will be printed by
+default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-c, \-\-show\-children
+Show a debug info entry\(aqs children when using
+the \fI\%\-\-debug\-info\fP, \fI\%\-\-find\fP,
+and \fI\%\-\-name\fP options.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-f <name>, \-\-find=<name>
+Search for the exact text <name> in the accelerator tables
+and print the matching debug information entries.
+When there is no accelerator tables or the name of the DIE
+you are looking for is not found in the accelerator tables,
+try using the slower but more complete \fI\%\-\-name\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-F, \-\-show\-form
+Show DWARF form types after the DWARF attribute types.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-h, \-\-help
+Show help and usage for this command.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-i, \-\-ignore\-case
+Ignore case distinctions in when searching entries by name
+or by regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-n <pattern>, \-\-name=<pattern>
+Find and print all debug info entries whose name
+(\fIDW_AT_name\fP attribute) matches the exact text in
+<pattern>. Use the \fI\%\-\-regex\fP option to have
+<pattern> become a regular expression for more flexible
+pattern matching.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-lookup=<address>
+Lookup <address> in the debug information and print out the file,
+function, block, and line table details.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-o <path>, \-\-out\-file=<path>
+Redirect output to a file specified by <path>.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-p, \-\-show\-parents
+Show a debug info entry\(aqs parent objects when using the
+\fI\%\-\-debug\-info\fP, \fI\%\-\-find\fP, and
+\fI\%\-\-name\fP options.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-r <n>, \-\-recurse\-depth=<n>
+Only recurse to a maximum depth of <n> when dumping debug info
+entries.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-statistics
+Collect debug info quality metrics and print the results
+as machine\-readable single\-line JSON output.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-x, \-\-regex
+Treat any <pattern> strings as regular expressions when searching
+instead of just as an exact string match.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-u, \-\-uuid
+Show the UUID for each architecture.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-diff
+Dump the output in a format that is more friendly for comparing
+DWARF output from two different files.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-v, \-\-verbose
+Display verbose information when dumping. This can help to debug
+DWARF issues.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-verify
+Verify the structure of the DWARF information by verifying the
+compile unit chains, DIE relationships graph, address
+ranges, and more.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-version
+Display the version of the tool.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-debug\-abbrev, \-\-debug\-aranges, \-\-debug\-cu\-index, \-\-debug\-frame [=<offset>], \-\-debug\-gnu\-pubnames, \-\-debug\-gnu\-pubtypes, \-\-debug\-info [=<offset>], \-\-debug\-line [=<offset>], \-\-debug\-loc [=<offset>], \-\-debug\-macro, \-\-debug\-pubnames, \-\-debug\-pubtypes, \-\-debug\-ranges, \-\-debug\-str, \-\-debug\-str\-offsets, \-\-debug\-tu\-index, \-\-debug\-types, \-\-eh\-frame, \-\-gdb\-index, \-\-apple\-names, \-\-apple\-types, \-\-apple\-namespaces, \-\-apple\-objc
+Dump the specified DWARF section by name. Only the
+\fI\&.debug_info\fP section is shown by default. Some entries
+support adding an \fI=<offset>\fP as a way to provide an
+optional offset of the exact entry to dump within the
+respective section. When an offset is provided, only the
+entry at that offset will be dumped, else the entire
+section will be dumped. Children of items at a specific
+offset can be dumped by also using the
+\fI\%\-\-show\-children\fP option where applicable.
.UNINDENT
.SH EXIT STATUS
.sp
\fBllvm\-dwarfdump\fP returns 0 if the input files were parsed and dumped
successfully. Otherwise, it returns 1.
+.SH SEE ALSO
+.sp
+\fBdsymutil(1)\fP
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-extract/llvm-extract.1 b/usr.bin/clang/llvm-extract/llvm-extract.1
index b69439c..cfdbdbb 100644
--- a/usr.bin/clang/llvm-extract/llvm-extract.1
+++ b/usr.bin/clang/llvm-extract/llvm-extract.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-EXTRACT" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-EXTRACT" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-extract \- extract a function from an LLVM module
.
@@ -124,6 +124,6 @@ bugpoint
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-link/Makefile b/usr.bin/clang/llvm-link/Makefile
index 9af68e8..1c5d02f 100644
--- a/usr.bin/clang/llvm-link/Makefile
+++ b/usr.bin/clang/llvm-link/Makefile
@@ -5,6 +5,4 @@ PROG_CXX= llvm-link
SRCDIR= tools/llvm-link
SRCS+= llvm-link.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-link/llvm-link.1 b/usr.bin/clang/llvm-link/llvm-link.1
index 91ed377..a7b57f5 100644
--- a/usr.bin/clang/llvm-link/llvm-link.1
+++ b/usr.bin/clang/llvm-link/llvm-link.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-LINK" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-LINK" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-link \- LLVM bitcode linker
.
@@ -84,6 +84,6 @@ occurs, it will exit with a non\-zero value.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-modextract/Makefile b/usr.bin/clang/llvm-modextract/Makefile
index 30ac2f6..75904dd 100644
--- a/usr.bin/clang/llvm-modextract/Makefile
+++ b/usr.bin/clang/llvm-modextract/Makefile
@@ -6,6 +6,4 @@ MAN=
SRCDIR= tools/llvm-modextract
SRCS= llvm-modextract.cpp
-LIBADD+= z
-
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-nm/llvm-nm.1 b/usr.bin/clang/llvm-nm/llvm-nm.1
index 7454a15..62fce6e 100644
--- a/usr.bin/clang/llvm-nm/llvm-nm.1
+++ b/usr.bin/clang/llvm-nm/llvm-nm.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-NM" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-NM" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-nm \- list LLVM bitcode and object file's symbol table
.
@@ -115,12 +115,12 @@ file.
.INDENT 0.0
.TP
.B \-B (default)
-Use BSD output format. Alias for \fB\-\-format=bsd\fP\&.
+Use BSD output format. Alias for \fI\-\-format=bsd\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-P
-Use POSIX.2 output format. Alias for \fB\-\-format=posix\fP\&.
+Use POSIX.2 output format. Alias for \fI\-\-format=posix\fP\&.
.UNINDENT
.INDENT 0.0
.TP
@@ -186,14 +186,17 @@ Sort symbols by size.
.B \-\-undefined\-only, \-u
Print only symbols referenced but not defined in this file.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-radix=RADIX, \-t
+Specify the radix of the symbol address(es). Values accepted d(decimal),
+x(hexadecomal) and o(octal).
+.UNINDENT
.SH BUGS
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
-\fBllvm\-nm\fP cannot demangle C++ mangled names, like GNU \fBnm\fP
-can.
-.IP \(bu 2
\fBllvm\-nm\fP does not support the full set of arguments that GNU
\fBnm\fP does.
.UNINDENT
@@ -208,6 +211,6 @@ llvm\-dis, ar(1), nm(1)
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile
new file mode 100644
index 0000000..a710218
--- /dev/null
+++ b/usr.bin/clang/llvm-objcopy/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+PROG_CXX= llvm-objcopy
+MAN=
+
+SRCDIR= tools/llvm-objcopy
+SRCS+= Object.cpp
+SRCS+= llvm-objcopy.cpp
+
+.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-pdbutil/Makefile b/usr.bin/clang/llvm-pdbutil/Makefile
index c78fc22..c668349 100644
--- a/usr.bin/clang/llvm-pdbutil/Makefile
+++ b/usr.bin/clang/llvm-pdbutil/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
PROG_CXX= llvm-pdbutil
-MAN=
SRCDIR= tools/llvm-pdbutil
SRCS+= Analyze.cpp
@@ -10,6 +9,7 @@ SRCS+= Diff.cpp
SRCS+= DiffPrinter.cpp
SRCS+= DumpOutputStyle.cpp
SRCS+= FormatUtil.cpp
+SRCS+= InputFile.cpp
SRCS+= LinePrinter.cpp
SRCS+= MinimalSymbolDumper.cpp
SRCS+= MinimalTypeDumper.cpp
diff --git a/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1 b/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1
new file mode 100644
index 0000000..f4960f5
--- /dev/null
+++ b/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1
@@ -0,0 +1,745 @@
+.\" $FreeBSD$
+.\" Man page generated from reStructuredText.
+.
+.TH "LLVM-PDBUTIL" "1" "2017-12-24" "6" "LLVM"
+.SH NAME
+llvm-pdbutil \- PDB File forensics and diagnostics
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.INDENT 0.0
+.IP \(bu 2
+\fI\%Synopsis\fP
+.IP \(bu 2
+\fI\%Description\fP
+.IP \(bu 2
+\fI\%Subcommands\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%pretty\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Filtering and Sorting Options\fP
+.IP \(bu 2
+\fI\%Symbol Type Options\fP
+.IP \(bu 2
+\fI\%Other Options\fP
+.UNINDENT
+.UNINDENT
+.IP \(bu 2
+\fI\%dump\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%MSF Container Options\fP
+.IP \(bu 2
+\fI\%Module & File Options\fP
+.IP \(bu 2
+\fI\%Symbol Options\fP
+.IP \(bu 2
+\fI\%Type Record Options\fP
+.IP \(bu 2
+\fI\%Miscellaneous Options\fP
+.UNINDENT
+.UNINDENT
+.IP \(bu 2
+\fI\%bytes\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%MSF File Options\fP
+.IP \(bu 2
+\fI\%PDB Stream Options\fP
+.IP \(bu 2
+\fI\%DBI Stream Options\fP
+.IP \(bu 2
+\fI\%Module Options\fP
+.IP \(bu 2
+\fI\%Type Record Options\fP
+.UNINDENT
+.UNINDENT
+.IP \(bu 2
+\fI\%pdb2yaml\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.UNINDENT
+.IP \(bu 2
+\fI\%yaml2pdb\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.UNINDENT
+.IP \(bu 2
+\fI\%merge\fP
+.INDENT 2.0
+.IP \(bu 2
+\fI\%Summary\fP
+.IP \(bu 2
+\fI\%Options\fP
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.SH SYNOPSIS
+.sp
+\fBllvm\-pdbutil\fP [\fIsubcommand\fP] [\fIoptions\fP]
+.SH DESCRIPTION
+.sp
+Display types, symbols, CodeView records, and other information from a
+PDB file, as well as manipulate and create PDB files. \fBllvm\-pdbutil\fP
+is normally used by FileCheck\-based tests to test LLVM\(aqs PDB reading and
+writing functionality, but can also be used for general PDB file investigation
+and forensics, or as a replacement for cvdump.
+.SH SUBCOMMANDS
+.sp
+\fBllvm\-pdbutil\fP is separated into several subcommands each tailored to
+a different purpose. A brief summary of each command follows, with more detail
+in the sections that follow.
+.INDENT 0.0
+.INDENT 3.5
+.INDENT 0.0
+.IP \(bu 2
+\fI\%pretty\fP \- Dump symbol and type information in a format that
+tries to look as much like the original source code as possible.
+.IP \(bu 2
+\fI\%dump\fP \- Dump low level types and structures from the PDB
+file, including CodeView records, hash tables, PDB streams, etc.
+.IP \(bu 2
+\fI\%bytes\fP \- Dump data from the PDB file\(aqs streams, records,
+types, symbols, etc as raw bytes.
+.IP \(bu 2
+\fI\%yaml2pdb\fP \- Given a yaml description of a PDB file, produce
+a valid PDB file that matches that description.
+.IP \(bu 2
+\fI\%pdb2yaml\fP \- For a given PDB file, produce a YAML
+description of some or all of the file in a way that the PDB can be
+reconstructed.
+.IP \(bu 2
+\fI\%merge\fP \- Given two PDBs, produce a third PDB that is the
+result of merging the two input PDBs.
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.SS pretty
+.sp
+\fBIMPORTANT:\fP
+.INDENT 0.0
+.INDENT 3.5
+The \fBpretty\fP subcommand is built on the Windows DIA SDK, and as such is not
+supported on non\-Windows platforms.
+.UNINDENT
+.UNINDENT
+.sp
+USAGE: \fBllvm\-pdbutil\fP pretty [\fIoptions\fP] <input PDB file>
+.SS Summary
+.sp
+The \fIpretty\fP subcommand displays a very high level representation of your
+program\(aqs debug info. Since it is built on the Windows DIA SDK which is the
+standard API that Windows tools and debuggers query debug information, it
+presents a more authoritative view of how a debugger is going to interpret your
+debug information than a mode which displays low\-level CodeView records.
+.SS Options
+.SS Filtering and Sorting Options
+.sp
+\fBNOTE:\fP
+.INDENT 0.0
+.INDENT 3.5
+\fIexclude\fP filters take priority over \fIinclude\fP filters. So if a filter
+matches both an include and an exclude rule, then it is excluded.
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-exclude\-compilands=<string>
+When dumping compilands, compiland source\-file contributions, or per\-compiland
+symbols, this option instructs \fBllvm\-pdbutil\fP to omit any compilands that
+match the specified regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-exclude\-symbols=<string>
+When dumping global, public, or per\-compiland symbols, this option instructs
+\fBllvm\-pdbutil\fP to omit any symbols that match the specified regular
+expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-exclude\-types=<string>
+When dumping types, this option instructs \fBllvm\-pdbutil\fP to omit any types
+that match the specified regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-include\-compilands=<string>
+When dumping compilands, compiland source\-file contributions, or per\-compiland
+symbols, limit the initial search to only those compilands that match the
+specified regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-include\-symbols=<string>
+When dumping global, public, or per\-compiland symbols, limit the initial
+search to only those symbols that match the specified regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-include\-types=<string>
+When dumping types, limit the initial search to only those types that match
+the specified regular expression.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-min\-class\-padding=<uint>
+Only display types that have at least the specified amount of alignment
+padding, accounting for padding in base classes and aggregate field members.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-min\-class\-padding\-imm=<uint>
+Only display types that have at least the specified amount of alignment
+padding, ignoring padding in base classes and aggregate field members.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-min\-type\-size=<uint>
+Only display types T where sizeof(T) is greater than or equal to the specified
+amount.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-no\-compiler\-generated
+Don\(aqt show compiler generated types and symbols
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-no\-enum\-definitions
+When dumping an enum, don\(aqt show the full enum (e.g. the individual enumerator
+values).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-no\-system\-libs
+Don\(aqt show symbols from system libraries
+.UNINDENT
+.SS Symbol Type Options
+.INDENT 0.0
+.TP
+.B \-all
+Implies all other options in this category.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-class\-definitions=<format>
+Displays class definitions in the specified format.
+.INDENT 7.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+=all \- Display all class members including data, constants, typedefs, functions, etc (default)
+=layout \- Only display members that contribute to class size.
+=none \- Don\(aqt display class definitions (e.g. only display the name and base list)
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-class\-order
+Displays classes in the specified order.
+.INDENT 7.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+=none \- Undefined / no particular sort order (default)
+=name \- Sort classes by name
+=size \- Sort classes by size
+=padding \- Sort classes by amount of padding
+=padding\-pct \- Sort classes by percentage of space consumed by padding
+=padding\-imm \- Sort classes by amount of immediate padding
+=padding\-pct\-imm \- Sort classes by percentage of space consumed by immediate padding
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-class\-recurse\-depth=<uint>
+When dumping class definitions, stop after recursing the specified number of times. The
+default is 0, which is no limit.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-classes
+Display classes
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-compilands
+Display compilands (e.g. object files)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-enums
+Display enums
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-externals
+Dump external (e.g. exported) symbols
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-globals
+Dump global symbols
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-lines
+Dump the mappings between source lines and code addresses.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-module\-syms
+Display symbols (variables, functions, etc) for each compiland
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-sym\-types=<types>
+Type of symbols to dump when \-globals, \-externals, or \-module\-syms is
+specified. (default all)
+.INDENT 7.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+=thunks \- Display thunk symbols
+=data \- Display data symbols
+=funcs \- Display function symbols
+=all \- Display all symbols (default)
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-symbol\-order=<order>
+For symbols dumped via the \-module\-syms, \-globals, or \-externals options, sort
+the results in specified order.
+.INDENT 7.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+=none \- Undefined / no particular sort order
+=name \- Sort symbols by name
+=size \- Sort symbols by size
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-typedefs
+Display typedef types
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-types
+Display all types (implies \-classes, \-enums, \-typedefs)
+.UNINDENT
+.SS Other Options
+.INDENT 0.0
+.TP
+.B \-color\-output
+Force color output on or off. By default, color if used if outputting to a
+terminal.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-load\-address=<uint>
+When displaying relative virtual addresses, assume the process is loaded at the
+given address and display what would be the absolute address.
+.UNINDENT
+.SS dump
+.sp
+USAGE: \fBllvm\-pdbutil\fP dump [\fIoptions\fP] <input PDB file>
+.SS Summary
+.sp
+The \fBdump\fP subcommand displays low level information about the structure of a
+PDB file. It is used heavily by LLVM\(aqs testing infrastructure, but can also be
+used for PDB forensics. It serves a role similar to that of Microsoft\(aqs
+\fIcvdump\fP tool.
+.sp
+\fBNOTE:\fP
+.INDENT 0.0
+.INDENT 3.5
+The \fBdump\fP subcommand exposes internal details of the file format. As
+such, the reader should be familiar with /PDB/index before using this
+command.
+.UNINDENT
+.UNINDENT
+.SS Options
+.SS MSF Container Options
+.INDENT 0.0
+.TP
+.B \-streams
+dump a summary of all of the streams in the PDB file.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-stream\-blocks
+In conjunction with \fI\%\-streams\fP, add information to the output about
+what blocks the specified stream occupies.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-summary
+Dump MSF and PDB header information.
+.UNINDENT
+.SS Module & File Options
+.INDENT 0.0
+.TP
+.B \-modi=<uint>
+For all options that dump information from each module/compiland, limit to
+the specified module.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-files
+Dump the source files that contribute to each displayed module.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-il
+Dump inlinee line information (DEBUG_S_INLINEELINES CodeView subsection)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-l
+Dump line information (DEBUG_S_LINES CodeView subsection)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-modules
+Dump compiland information
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-xme
+Dump cross module exports (DEBUG_S_CROSSSCOPEEXPORTS CodeView subsection)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-xmi
+Dump cross module imports (DEBUG_S_CROSSSCOPEIMPORTS CodeView subsection)
+.UNINDENT
+.SS Symbol Options
+.INDENT 0.0
+.TP
+.B \-globals
+dump global symbol records
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-global\-extras
+dump additional information about the globals, such as hash buckets and hash
+values.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-publics
+dump public symbol records
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-public\-extras
+dump additional information about the publics, such as hash buckets and hash
+values.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-symbols
+dump symbols (functions, variables, etc) for each module dumped.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-sym\-data
+For each symbol record dumped as a result of the \fI\%\-symbols\fP option,
+display the full bytes of the record in binary as well.
+.UNINDENT
+.SS Type Record Options
+.INDENT 0.0
+.TP
+.B \-types
+Dump CodeView type records from TPI stream
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-type\-extras
+Dump additional information from the TPI stream, such as hashes and the type
+index offsets array.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-type\-data
+For each type record dumped, display the full bytes of the record in binary as
+well.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-type\-index=<uint>
+Only dump types with the specified type index.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-ids
+Dump CodeView type records from IPI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-id\-extras
+Dump additional information from the IPI stream, such as hashes and the type
+index offsets array.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-id\-data
+For each ID record dumped, display the full bytes of the record in binary as
+well.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-id\-index=<uint>
+only dump ID records with the specified hexadecimal type index.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-dependents
+When used in conjunction with \fI\%\-type\-index\fP or \fI\%\-id\-index\fP,
+dumps the entire dependency graph for the specified index instead of just the
+single record with the specified index. For example, if type index 0x4000 is
+a function whose return type has index 0x3000, and you specify
+\fI\-dependents=0x4000\fP, then this would dump both records (as well as any other
+dependents in the tree).
+.UNINDENT
+.SS Miscellaneous Options
+.INDENT 0.0
+.TP
+.B \-all
+Implies most other options.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-section\-contribs
+Dump section contributions.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-section\-headers
+Dump image section headers.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-section\-map
+Dump section map.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-string\-table
+Dump PDB string table.
+.UNINDENT
+.SS bytes
+.sp
+USAGE: \fBllvm\-pdbutil\fP bytes [\fIoptions\fP] <input PDB file>
+.SS Summary
+.sp
+Like the \fBdump\fP subcommand, the \fBbytes\fP subcommand displays low level
+information about the structure of a PDB file, but it is used for even deeper
+forensics. The \fBbytes\fP subcommand finds various structures in a PDB file
+based on the command line options specified, and dumps them in hex. Someone
+working on support for emitting PDBs would use this heavily, for example, to
+compare one PDB against another PDB to ensure byte\-for\-byte compatibility. It
+is not enough to simply compare the bytes of an entire file, or an entire stream
+because it\(aqs perfectly fine for the same structure to exist at different
+locations in two different PDBs, and "finding" the structure is half the battle.
+.SS Options
+.SS MSF File Options
+.INDENT 0.0
+.TP
+.B \-block\-range=<start[\-end]>
+Dump binary data from specified range of MSF file blocks.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-byte\-range=<start[\-end]>
+Dump binary data from specified range of bytes in the file.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-fpm
+Dump the MSF free page map.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-stream\-data=<string>
+Dump binary data from the specified streams. Format is SN[:Start][@Size].
+For example, \fI\-stream\-data=7:3@12\fP dumps 12 bytes from stream 7, starting
+at offset 3 in the stream.
+.UNINDENT
+.SS PDB Stream Options
+.INDENT 0.0
+.TP
+.B \-name\-map
+Dump bytes of PDB Name Map
+.UNINDENT
+.SS DBI Stream Options
+.INDENT 0.0
+.TP
+.B \-ec
+Dump the edit and continue map substream of the DBI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-files
+Dump the file info substream of the DBI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-modi
+Dump the modi substream of the DBI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-sc
+Dump section contributions substream of the DBI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-sm
+Dump the section map from the DBI stream.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-type\-server
+Dump the type server map from the DBI stream.
+.UNINDENT
+.SS Module Options
+.INDENT 0.0
+.TP
+.B \-mod=<uint>
+Limit all options in this category to the specified module index. By default,
+options in this category will dump bytes from all modules.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-chunks
+Dump the bytes of each module\(aqs C13 debug subsection.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-split\-chunks
+When specified with \fI\%\-chunks\fP, split the C13 debug subsection into a
+separate chunk for each subsection type, and dump them separately.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-syms
+Dump the symbol record substream from each module.
+.UNINDENT
+.SS Type Record Options
+.INDENT 0.0
+.TP
+.B \-id=<uint>
+Dump the record from the IPI stream with the given type index.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-type=<uint>
+Dump the record from the TPI stream with the given type index.
+.UNINDENT
+.SS pdb2yaml
+.sp
+USAGE: \fBllvm\-pdbutil\fP pdb2yaml [\fIoptions\fP] <input PDB file>
+.SS Summary
+.SS Options
+.SS yaml2pdb
+.sp
+USAGE: \fBllvm\-pdbutil\fP yaml2pdb [\fIoptions\fP] <input YAML file>
+.SS Summary
+.sp
+Generate a PDB file from a YAML description. The YAML syntax is not described
+here. Instead, use \fI\%llvm\-pdbutil pdb2yaml\fP and
+examine the output for an example starting point.
+.SS Options
+.INDENT 0.0
+.TP
+.B \-pdb=<file\-name>
+.UNINDENT
+.sp
+Write the resulting PDB to the specified file.
+.SS merge
+.sp
+USAGE: \fBllvm\-pdbutil\fP merge [\fIoptions\fP] <input PDB file 1> <input PDB file 2>
+.SS Summary
+.sp
+Merge two PDB files into a single file.
+.SS Options
+.INDENT 0.0
+.TP
+.B \-pdb=<file\-name>
+.UNINDENT
+.sp
+Write the resulting PDB to the specified file.
+.SH AUTHOR
+Maintained by The LLVM Team (http://llvm.org/).
+.SH COPYRIGHT
+2003-2017, LLVM Project
+.\" Generated by docutils manpage writer.
+.
diff --git a/usr.bin/clang/llvm-profdata/llvm-profdata.1 b/usr.bin/clang/llvm-profdata/llvm-profdata.1
index 18c26fc..f764541 100644
--- a/usr.bin/clang/llvm-profdata/llvm-profdata.1
+++ b/usr.bin/clang/llvm-profdata/llvm-profdata.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-PROFDATA" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-PROFDATA" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-profdata \- Profile data tool
.
@@ -61,6 +61,9 @@ or counts it contains. In general, the input from a longer training run will be
interpreted as relatively more important than a shorter run. Depending on the
nature of the training runs it may be useful to adjust the weight given to each
input file by using the \fB\-weighted\-input\fP option.
+.sp
+Profiles passed in via \fB\-weighted\-input\fP, \fB\-input\-files\fP, or via positional
+arguments are processed once for each time they are seen.
.SS OPTIONS
.INDENT 0.0
.TP
@@ -76,10 +79,18 @@ indexed profile data can\(aqt be written to standard output.
.INDENT 0.0
.TP
.B \-weighted\-input=weight,filename
-Specify an input file name along with a weight. The profile counts of the input
-file will be scaled (multiplied) by the supplied \fBweight\fP, where where \fBweight\fP
-is a decimal integer >= 1. Input files specified without using this option are
-assigned a default weight of 1. Examples are shown below.
+Specify an input file name along with a weight. The profile counts of the
+supplied \fBfilename\fP will be scaled (multiplied) by the supplied
+\fBweight\fP, where where \fBweight\fP is a decimal integer >= 1.
+Input files specified without using this option are assigned a default
+weight of 1. Examples are shown below.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-input\-files=path, \-f=path
+Specify a file which contains a list of files to merge. The entries in this
+file are newline\-separated. Lines starting with \(aq#\(aq are skipped. Entries may
+be of the form <filename> or <weight>,<filename>.
.UNINDENT
.INDENT 0.0
.TP
@@ -115,6 +126,19 @@ reader.
.sp
Emit the profile using GCC\(aqs gcov format (Not yet supported).
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-sparse[=true|false]
+Do not emit function records with 0 execution count. Can only be used in
+conjunction with \-instr. Defaults to false, since it can inhibit compiler
+optimization during PGO.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-num\-threads=N, \-j=N
+Use N threads to perform profile merging. When N=0, llvm\-profdata auto\-detects
+an appropriate number of threads to use. This is the default.
+.UNINDENT
.SS EXAMPLES
.SS Basic Usage
.sp
@@ -208,9 +232,21 @@ annotations.
.UNINDENT
.INDENT 0.0
.TP
+.B \-topn=n
+Instruct the profile dumper to show the top \fBn\fP functions with the
+hottest basic blocks in the summary section. By default, the topn functions
+are not dumped.
+.UNINDENT
+.INDENT 0.0
+.TP
.B \-sample
Specify that the input profile is a sample\-based profile.
.UNINDENT
+.INDENT 0.0
+.TP
+.B \-memop\-sizes
+Show the profiled sizes of the memory intrinsic calls for shown functions.
+.UNINDENT
.SH EXIT STATUS
.sp
\fBllvm\-profdata\fP returns 1 if the command is omitted or is invalid,
@@ -218,6 +254,6 @@ if it cannot read input files, or if there is a mismatch between their data.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 b/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1
index fc43d8d..520d843 100644
--- a/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1
+++ b/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "LLVM-SYMBOLIZER" "1" "2016-03-03" "3.8" "LLVM"
+.TH "LLVM-SYMBOLIZER" "1" "2017-12-24" "6" "LLVM"
.SH NAME
llvm-symbolizer \- convert addresses into source code locations
.
@@ -158,6 +158,6 @@ prefixed by (inlined by). Refer to listed examples.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
diff --git a/usr.bin/clang/llvm-tblgen/Makefile b/usr.bin/clang/llvm-tblgen/Makefile
index 58c15a3..0cc826a 100644
--- a/usr.bin/clang/llvm-tblgen/Makefile
+++ b/usr.bin/clang/llvm-tblgen/Makefile
@@ -11,6 +11,7 @@ SRCS+= CTagsEmitter.cpp
SRCS+= CallingConvEmitter.cpp
SRCS+= CodeEmitterGen.cpp
SRCS+= CodeGenDAGPatterns.cpp
+SRCS+= CodeGenHwModes.cpp
SRCS+= CodeGenInstruction.cpp
SRCS+= CodeGenMapTable.cpp
SRCS+= CodeGenRegisters.cpp
@@ -26,12 +27,15 @@ SRCS+= DisassemblerEmitter.cpp
SRCS+= FastISelEmitter.cpp
SRCS+= FixedLenDecoderEmitter.cpp
SRCS+= GlobalISelEmitter.cpp
+SRCS+= InfoByHwMode.cpp
+SRCS+= InstrDocsEmitter.cpp
SRCS+= InstrInfoEmitter.cpp
SRCS+= IntrinsicEmitter.cpp
SRCS+= OptParserEmitter.cpp
SRCS+= PseudoLoweringEmitter.cpp
SRCS+= RegisterBankEmitter.cpp
SRCS+= RegisterInfoEmitter.cpp
+SRCS+= SDNodeProperties.cpp
SRCS+= SearchableTableEmitter.cpp
SRCS+= SubtargetEmitter.cpp
SRCS+= SubtargetFeatureInfo.cpp
@@ -39,6 +43,7 @@ SRCS+= TableGen.cpp
SRCS+= Types.cpp
SRCS+= X86DisassemblerTables.cpp
SRCS+= X86EVEX2VEXTablesEmitter.cpp
+SRCS+= X86FoldTablesEmitter.cpp
SRCS+= X86ModRMFilters.cpp
SRCS+= X86RecognizableInstr.cpp
diff --git a/usr.bin/clang/opt/opt.1 b/usr.bin/clang/opt/opt.1
index a498d99..c778332 100644
--- a/usr.bin/clang/opt/opt.1
+++ b/usr.bin/clang/opt/opt.1
@@ -1,7 +1,7 @@
.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
-.TH "OPT" "1" "2016-03-03" "3.8" "LLVM"
+.TH "OPT" "1" "2017-12-24" "6" "LLVM"
.SH NAME
opt \- LLVM optimizer
.
@@ -39,16 +39,16 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
The \fBopt\fP command is the modular LLVM optimizer and analyzer. It
takes LLVM source files as input, runs the specified optimizations or analyses
on it, and then outputs the optimized file or the analysis results. The
-function of \fBopt\fP depends on whether the \fB\-analyze\fP option is
+function of \fBopt\fP depends on whether the \fI\-analyze\fP option is
given.
.sp
-When \fB\-analyze\fP is specified, \fBopt\fP performs various analyses
+When \fI\-analyze\fP is specified, \fBopt\fP performs various analyses
of the input source. It will usually print the results on standard output, but
in a few cases, it will print output to standard error or generate a file with
the analysis output, which is usually done when the output is meant for another
program.
.sp
-While \fB\-analyze\fP is \fInot\fP given, \fBopt\fP attempts to produce an
+While \fI\-analyze\fP is \fInot\fP given, \fBopt\fP attempts to produce an
optimized output file. The optimizations available via \fBopt\fP depend
upon what libraries were linked into it as well as any additional libraries
that have been loaded with the \fI\%\-load\fP option. Use the \fI\%\-help\fP
@@ -99,21 +99,21 @@ This option simply removes the inlining pass from the standard list.
.INDENT 0.0
.TP
.B \-disable\-opt
-This option is only meaningful when \fB\-std\-link\-opts\fP is given. It
+This option is only meaningful when \fI\-std\-link\-opts\fP is given. It
disables most passes.
.UNINDENT
.INDENT 0.0
.TP
.B \-strip\-debug
This option causes opt to strip debug information from the module before
-applying other optimizations. It is essentially the same as \fB\-strip\fP
+applying other optimizations. It is essentially the same as \fI\-strip\fP
but it ensures that stripping of debug information is done first.
.UNINDENT
.INDENT 0.0
.TP
.B \-verify\-each
This option causes opt to add a verify pass after every pass otherwise
-specified on the command line (including \fB\-verify\fP). This is useful
+specified on the command line (including \fI\-verify\fP). This is useful
for cases where it is suspected that a pass is creating an invalid module but
it is not clear which pass is doing it.
.UNINDENT
@@ -165,6 +165,6 @@ occurs, it will exit with a non\-zero value.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
-2003-2016, LLVM Project
+2003-2017, LLVM Project
.\" Generated by docutils manpage writer.
.
OpenPOWER on IntegriCloud