summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* llvm-ar: reduce some duplication, NFCSaleem Abdulrasool2016-06-221-27/+19
| | | | | | | Improve the previous change by using a local function to reduce the duplication of the object file scanning. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273429 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-readobj] - Teach llvm-readobj to print dependencies of SHT_GNU_verdef ↵George Rimar2016-06-221-18/+26
| | | | | | | | | | | | | | | and refactor dumping method. This patch changes single method of llvm-readobj. It teaches SHT_GNU_verdef dumper to print version dependencies, also it removes few fields from output that can be dumped with other keys and slightly refactors code. Testcase was also modified to match the changes. Change is required for testcases of upcoming lld patches. Differential revision: http://reviews.llvm.org/D21552 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273417 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-ar: be more clever about default formatSaleem Abdulrasool2016-06-221-18/+76
| | | | | | | | | | | | Try to be more clever about selecting the default format. When an existing archive is used, use the type of the archive to determine the format. When existing members are present, use the first member's format to determine the format to use. If we are creating an empty archive (MRI mode) or are adding non-object members, default to the current behaviour of using the host type due to the lack of a better alternative. This aids in cross-compilation on Darwin to non-Darwin platforms which rely on GNU format archives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273373 91177308-0d34-0410-b5e6-96231b3b80d8
* IR: Allow metadata attachments on declarations, and fix lazy loaded metadata ↵Peter Collingbourne2016-06-211-18/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issue with globals. This change is motivated by an upcoming change to the metadata representation used for CFI. The indirect function call checker needs type information for external function declarations in order to correctly generate jump table entries for such declarations. We currently associate such type information with declarations using a global metadata node, but I plan [1] to move all such metadata to global object attachments. In bitcode, metadata attachments for function declarations appear in the global metadata block. This seems reasonable to me because I expect metadata attachments on declarations to be uncommon. In the long term I'd also expect this to be the case for CFI, because we'd want to use some specialized bitcode format for this metadata that could be read as part of the ThinLTO thin-link phase, which would mean that it would not appear in the global metadata block. To solve the lazy loaded metadata issue I was seeing with D20147, I use the same bitcode representation for metadata attachments for global variables as I do for function declarations. Since there's a use case for metadata attachments in the global metadata block, we might as well use that representation for global variables as well, at least until we have a mechanism for lazy loading global variables. In the assembly format, the metadata attachments appear after the "declare" keyword in order to avoid a parsing ambiguity. [1] http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273336 91177308-0d34-0410-b5e6-96231b3b80d8
* Update llvm-obdump(1) to print FAT_MAGIC_64 for Darwin’s 64-bit universal ↵Kevin Enderby2016-06-211-3/+6
| | | | | | | | | | | | | | files with the -macho and -universal-headers flags. Just a follow on to r273207, I missed updating the printing of the fat magic number when the universal file is a 64-bit universal file. rdar://26899493 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273324 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete some dead code.Rafael Espindola2016-06-211-16/+0
| | | | | | Found by gcc 6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273303 91177308-0d34-0410-b5e6-96231b3b80d8
* [build] Make sure to link main executable with pthreadsArtem Belevich2016-06-211-1/+7
| | | | | | | | | | Otherwise it gets linked in by one of the dependencies of shared libraries which may be too late and we end up with weird crashes in std::call_once(). Differential Revision: http://reviews.llvm.org/D21478 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273302 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-ar: correct typoSaleem Abdulrasool2016-06-211-1/+1
| | | | | | Default was misspelt. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273287 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply another batch of fixes from clang-tidy's ↵Benjamin Kramer2016-06-172-20/+23
| | | | | | | | performance-unnecessary-value-param. Contains some manual fixes. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273047 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Don't error on missing FPO streamsReid Kleckner2016-06-171-35/+48
| | | | | | | | 64-bit PDBs never have FPO data. They have xdata instead. Also improve error recovery of stream summary dumping while I'm here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273046 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use the new x86 relax relocations on the gold plugin.Rafael Espindola2016-06-171-0/+4
| | | | | | Should bring back the bots with old versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273022 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the default of -relax-relocations.Rafael Espindola2016-06-171-3/+3
| | | | | | | | | | llvm-mc is a developer tool, as such it make sense for it to use new features by default. This doesn't change the user facing clang, which still defaults to non relaxable relocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273014 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-162-8/+12
| | | | | | | There was a regression introduced during type stream merging when visiting a field list record. This has been fixed in this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272929 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-162-10/+6
| | | | | | | | This reverts commit fb0dd311e1ad945827b8ffd5354f4810e2be1579. This breaks some llvm-readobj tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272927 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Change type visitor pattern to be dynamic.Zachary Turner2016-06-162-6/+10
| | | | | | | | | | | | | | | This allows better catching of compiler errors since we can use the override keyword to verify that methods are actually overridden. Also in this patch I've changed from storing a boolean Error code everywhere to returning an llvm::Error, to propagate richer error information up the call stack. Reviewed By: ruiu, rnk Differential Revision: http://reviews.llvm.org/D21410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272926 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-objdump] Support detection of feature bits from the object and ↵Daniel Sanders2016-06-161-4/+2
| | | | | | | | | | | | | | | | | | | | implement this for Mips. Summary: The Mips implementation only covers the feature bits described by the ELF e_flags so far. Mips stores additional feature bits such as MSA in the .MIPS.abiflags section. Also fixed a small bug this revealed where microMIPS wouldn't add the EF_MIPS_MICROMIPS flag when using -filetype=obj. Reviewers: echristo, rafael Subscribers: rafael, mehdi_amini, dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21125 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272880 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bugpoint] Erase comdat annotations after removing a global's initializer.Justin Lebar2016-06-152-0/+4
| | | | | | | | | | | | | | | Summary: This is necessary to keep the verifier happy after bugpoint removes an initializer from a global variable with a comdat annotation, because globals without initializers may not have comdats. Reviewers: majnemer, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21274 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272854 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-objdump when disassembling a stripped Mach-O binary with the -macho ↵Kevin Enderby2016-06-151-1/+21
| | | | | | | | | | | | | | | | | | | option. It was printing out nothing in this case. llvm-objdump tries to disassemble sections a symbol at a time. In the case of a fully stripped Mach-O executable the only symbol remaining in the (__TEXT,__text) section is the special linker defined symbol __mh_execute_header . This symbol is special in that while it is N_SECT symbol in the (__TEXT,__text) its address is before the start of the (__TEXT,__text). It’s address is the start of the __TEXT segment which is where the mach header is statically linked. So the code in DisassembleMachO() needs to deal with this case specially. rdar://26778273 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272837 91177308-0d34-0410-b5e6-96231b3b80d8
* Use FPasses in opt exactly when it is initialized.Patrik Hagglund2016-06-151-1/+1
| | | | | | | | | | | | | Previously, there was a discrepancy between the population of function passes in FPasses, and their invocation. Function passes specified on the command line, after an optimizaton level was simply discared. This fix PR27509. Patch by Jesper Antonsson. Differential Review: http://reviews.llvm.org/D20725 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272770 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for callsite in the new C API for attributesAmaury Sechet2016-06-151-0/+16
| | | | | | | | | | | | Summary: The second consumer of attributes. Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21266 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272754 91177308-0d34-0410-b5e6-96231b3b80d8
* IR: Introduce local_unnamed_addr attribute.Peter Collingbourne2016-06-141-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing unnamed_addr attribute in that it only describes a local property of the module rather than a global property of the symbol. This attribute is intended to be used by the code generator and LTO to allow the linker to decide whether the global needs to be in the symbol table. It is possible to exclude a global from the symbol table if three things are true: - This attribute is present on every instance of the global (which means that the normal rule that the global must have a unique address can be broken without being observable by the program by performing comparisons against the global's address) - The global has linkonce_odr linkage (which means that each linkage unit must have its own copy of the global if it requires one, and the copy in each linkage unit must be the same) - It is a constant or a function (which means that the program cannot observe that the unique-address rule has been broken by writing to the global) Although this attribute could in principle be computed from the module contents, LTO clients (i.e. linkers) will normally need to be able to compute this property as part of symbol resolution, and it would be inefficient to materialize every module just to compute it. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html for earlier discussion. Part of the fix for PR27553. Differential Revision: http://reviews.llvm.org/D20348 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272709 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit "[pdb] Actually write a PDB to disk from YAML.""Zachary Turner2016-06-144-66/+126
| | | | | | | Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21220 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272708 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[pdb] Actually write a PDB to disk from YAML."Zachary Turner2016-06-144-126/+66
| | | | | | | | | This reverts commit 879139e1c6577b09df52de56a6bab856a19ed185. This was committed accidentally when I blindly typed git svn dcommit instead of the command to generate a patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272693 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Actually write a PDB to disk from YAML.Zachary Turner2016-06-144-66/+126
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272692 91177308-0d34-0410-b5e6-96231b3b80d8
* Run clang-tidy's performance-unnecessary-copy-initialization over LLVM.Benjamin Kramer2016-06-121-1/+1
| | | | | | No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272516 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we have a Add/Remove/Has function for various thing that can have ↵Amaury Sechet2016-06-121-1/+16
| | | | | | | | | | | | | | attribute. Summary: This also deprecated the get attribute function familly. Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight Subscribers: axw, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19181 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272504 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PDBFile take a StreamInterface instead of a MemBuffer.Zachary Turner2016-06-101-1/+19
| | | | | | | | | | | | | | | This is the next step towards being able to write PDBs. MemoryBuffer is immutable, and StreamInterface is our replacement which can be any combination of read-only, read-write, or write-only depending on the particular implementation. The one place where we were creating a PDBFile (in RawSession) is updated to subclass ByteStream with a simple adapter that holds a MemoryBuffer, and initializes the superclass with the buffer's array, so that all the functionality of ByteStream works transparently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272370 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for writing through StreamInterface.Zachary Turner2016-06-101-2/+2
| | | | | | | | | | | This adds method and tests for writing to a PDB stream. With this, even a PDB stream which is discontiguous can be treated as a sequential stream of bytes for the purposes of writing. Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21157 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272369 91177308-0d34-0410-b5e6-96231b3b80d8
* [llc] Do not create the pass config several times for run-pass.Quentin Colombet2016-06-101-6/+7
| | | | | | Thanks to Matthias Braun for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272358 91177308-0d34-0410-b5e6-96231b3b80d8
* [llc] Add support for several run-pass options.Quentin Colombet2016-06-101-27/+50
| | | | | | | | | | | | | | | | | Previously we could run only one machine pass with the run-pass option. With that patch, we can now specify several passes with several run-pass options (or just one option with a list of comma separated passes) and llc will build the related pipeline. This is great to test the interaction of two passes that are not necessarily next to each other in the pipeline, or play with pass ordering. Now, we should be at parity with opt for the flexibility of running passes. Note: I also moved the run pass option from CommandFlags.h to llc.cpp because, really, this is needed only there! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272356 91177308-0d34-0410-b5e6-96231b3b80d8
* [llc] Remove exit-on-error flag from MIR tests (PR27770)Diana Picus2016-06-091-3/+1
| | | | | | | | | | | | | | | | This is made possible by removing an assert in llc that assumed MIRParser::parseLLVMModule would exit on error. MIRParser's documentation states that it returns null if a parsing error occurs, so there's no reason to assert. We can instead just fall through to where the check for a module is performed and exit if it is null. This commit is part of the clean-up after r269655. Fixes PR27770 Differential Revision: http://reviews.llvm.org/D20371 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272254 91177308-0d34-0410-b5e6-96231b3b80d8
* [ThinLTO/gold] Enable summary-based internalizationTeresa Johnson2016-06-091-12/+71
| | | | | | | | | | | | Summary: Enable existing summary-based importing support in the gold-plugin. Reviewers: mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: http://reviews.llvm.org/D21080 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272239 91177308-0d34-0410-b5e6-96231b3b80d8
* Search for llvm-symbolizer binary in the same directory as argv[0], beforeRichard Smith2016-06-0933-52/+37
| | | | | | | | looking for it along $PATH. This allows installs of LLVM tools outside of $PATH to find the symbolizer and produce pretty backtraces if they crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272232 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdbdump-fuzzer] Try to fix build errors in fuzzer.Zachary Turner2016-06-091-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272230 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleanup uses of USES_TERMINALChris Bieneman2016-06-081-2/+2
| | | | | | Now that we are on CMake 3.4.3 we no longer need a version check around this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272211 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply most suggestions of clang-tidy's performance-unnecessary-value-paramBenjamin Kramer2016-06-086-15/+16
| | | | | | | Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272190 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Handle stream index errors better.Zachary Turner2016-06-081-130/+133
| | | | | | | Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21128 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272172 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid copies of std::strings and APInt/APFloats where we only read from itBenjamin Kramer2016-06-081-2/+2
| | | | | | | | As suggested by clang-tidy's performance-unnecessary-copy-initialization. This can easily hit lifetime issues, so I audited every change and ran the tests under asan, which came back clean. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272126 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Try to fix use after free.Zachary Turner2016-06-082-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272078 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdbdump] Print out # of hash buckets.Rui Ueyama2016-06-071-0/+1
| | | | | | In the reference code, the field name is `cHashBuckets`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272075 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdbdump] Print out TPI hash key size.Rui Ueyama2016-06-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272073 91177308-0d34-0410-b5e6-96231b3b80d8
* Retry^4 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-071-6/+59
| | | | | | | | | | Changes since the initial commit: - Use echo instead of printf. This should side-step the character escaping issues on Windows. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272068 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-readobj] - Teach llvm-readobj to dump .gnu.version_r sectionsGeorge Rimar2016-06-071-0/+55
| | | | | | | | | | SHT_GNU_verneed (.gnu.version_r) is a version dependency section. It was the last symbol versioning relative section that was not dumped, now it is. Differential revision: http://reviews.llvm.org/D21024 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271998 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdb] Use MappedBlockStream to parse the PDB directory.Zachary Turner2016-06-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to efficiently write PDBs, we need to be able to make a StreamWriter class similar to a StreamReader, which can transparently deal with writing to discontiguous streams, and we need to use this for all writing, similar to how we use StreamReader for all reading. Most discontiguous streams are the typical numbered streams that appear in a PDB file and are described by the directory, but the exception to this, that until now has been parsed by hand, is the directory itself. MappedBlockStream works by querying the directory to find out which blocks a stream occupies and various other things, so naturally the same logic could not possibly work to describe the blocks that the directory itself resided on. To solve this, I've introduced an abstraction IPDBStreamData, which allows the client to query for the list of blocks occupied by the stream, as well as the stream length. I provide two implementations of this: one which queries the directory (for indexed streams), and one which queries the super block (for the directory stream). This has the side benefit of vastly simplifying the code to parse the directory. Whereas before a mini state machine was rolled by hand, now we simply use FixedStreamArray to read out the stream sizes, then build a vector of FixedStreamArrays for the stream map, all in just a few lines of code. Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21046 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271982 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file""Vedant Kumar2016-06-061-63/+13
| | | | | | | | | This reverts commit r271953. It's still breaking on Windows, though the list initialization issue is fixed: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/3751 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271963 91177308-0d34-0410-b5e6-96231b3b80d8
* Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-13/+63
| | | | | | | | | | | | | Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. - Don't use list-initialization for a std::string in WeightedFile. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271953 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-58/+13
| | | | | | | | This reverts commit r271949. It breaks the Windows build: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12796 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271952 91177308-0d34-0410-b5e6-96231b3b80d8
* Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-13/+58
| | | | | | | | | | | | Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271949 91177308-0d34-0410-b5e6-96231b3b80d8
* [pdbdump] Print section header flags.Rui Ueyama2016-06-061-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271943 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Get rid of MachO header unionChris Bieneman2016-06-061-11/+6
| | | | | | This is based on post-commit feedback from Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271942 91177308-0d34-0410-b5e6-96231b3b80d8