Squashed 'llvm/' changes from cc4b123..57a73c2

57a73c2 Use IntrusiveRefCntPtr to manage the lifetime of BitCodeAbbrevs.
d189a04 R600/SI: Add preliminary support for flat address space
035f02c R600/SI: Fix promote alloca pass breaking addrspacecast
e0a7bbc R600/SI: Enable named operand table for MTBUF
fa13b44 [mips] Use early exit in MipsAsmParser::matchCPURegisterName(). NFC.
fcc1a51 [mips] Marked the DADDiu instruction aliases as MIPS III.
c537183 [x86] Begin emitting PBLENDW instructions for integer blend operations when SSE4.1 is available.
9277ad2 [x86] Add an explicit SSE3 run to this test and flesh out a bunch of missing specific checks.
2fdec16 [x86] Teach the x86 DAG combiner to form UNPCKLPS and UNPCKHPS instructions from the relevant shuffle patterns.
08780d4 [x86] Teach the x86 DAG combiner to form MOVSLDUP and MOVSHDUP instructions when it finds an appropriate pattern.
69513f1 Fix a non-virtual destructor warning introduced in r217747.
04402a6 [x86] Undo a flawed transform I added to form UNPCK instructions when AVX is available, and generally tidy up things surrounding UNPCK formation.
a6cc351 [x86] Teach the new vector shuffle lowering to use 'punpcklwd' and 'punpckhwd' instructions when suitable rather than falling back to the generic algorithm.
d090be9 Fix ambiguous typedef introduced in r217747.
c3e70ca InstSimplify: Simplify trivial and/or of icmps
740506d Fix DebugInfo replaceAllUsesWith.
04dc148 Move replaceAllUsesWith() from DIType to DIDescriptor.
ea3ce67 Introduce the DWARFUnitSection abstraction.
b1287f5 llvm-cov: Clean up some redundancy in the view API (NFC)
baca001 llvm-cov: Simplify CounterMappingRegion, pushing logic to its user
e610c32 [x86] Teach the new vector shuffle lowering to use BLENDPS and BLENDPD.
0309c5d llvm/test/CodeGen/X86/vec_shuffle-38.ll: Add explicit -mtriple=x86_64-unknown to avoid incompatibility of win32.
59def2b [x86] Add an SSE41 mode to this test. Nothing interesting here, its the same as SSE3.
151a867 [x86] Switch this test to use an ALL prefix with special SSE2 and SSE3 variants where significant.
85e3709 [x86] Add some test cases where we should emit blendpd in SSE4.1. No actual change yet though.
3395717 [x86] Teach the vector combiner that picks a canonical shuffle from to support transforming the forms from the new vector shuffle lowering to use 'movddup' when appropriate.
e1c77ca In DwarfEHPrepare, after all passes are run, RewindFunction may be a dangling pointer to a dead function. To make sure it's valid, doFinalization nullptrs RewindFunction just like the constructor and so it will be found on next run.
a0ba498 R600/SI: Fix broken check lines
4fb9bbe [A57FPLoadBalancing] Modify r217689 - actually we do need to check defs
5bf1f01 [FastISel][AArch64] Add support for non-native types for logical ops.
c2104d4 Add control of function merging to the PMBuilder.
75d7f73 Fix typo
e853a86 Simplify code. No functionality change.
9f4b17d [AArch64] Update test case to pass with post-RA MI scheduler.
a77096b [llvm-objdump] Use PRIX64 with format()
2981a19 Stop suppress error messages in test case to see why one buildbot is failing
9957380 [AArch64] Don't enable the post-RA MI scheduler at OptNone.
00edf1f Allow targets to custom legalize vector insertion and extraction.
a240fc5 [llvm-objdump] support -rebase option for mach-o to dump rebasing info
824444e llvm-profdata: Avoid undefined behaviour when reading raw profiles
206359b Remove an unnecessary restriction.  MIsNeedChainEdge() should be checked even when scheduler AliasAnalysis is not enabled.  A good chunk of the MIsNeedChainEdge() is logic that is valid and should be applied even for targets that are not using for alias analysis.
0f39f35 The MCAssembler.h include isn't used.
97688c4 Add an overload of getLastArgNoClaim taking two OptSpecifiers.
9adca7f FileCheckize. NFC.
5223ff8 Add support for le64.
4fb3a96 [AArch64] Enable post-RA MI scheduler.
ca33245 [A57FPLoadBalancing] Remove support for vector types
b4fbcbc [A57FPLoadBalancing] Ignore <def>s when checking if a chain may be killed.
c919e57 [lit] Parse all strings as UTF-8 rather than ASCII.
81d53b7 Move sys::fs::AccessMode out of @brief in the function. [-Wdocumentation]
3b59cfd sys::fs::access(): Fix @param [-Wdocumentation]
35d9566 llvm/test/CodeGen/X86/vec_ctbits.ll: Add explicit -mtriple=x86_64-unknown. It was incompatible to Win32 x64.
9204ab0 [A57LoadBalancing] unique_ptr-ify.
614d868 [mips][microMIPS] Implement JRADDIUSP instruction Differential Revision: http://reviews.llvm.org/D5046
183704c Address comments on r217622
7fd9d56 [mips][microMIPS] Implement BGEZALS and BLTZALS instructions Differential Revision: http://reviews.llvm.org/D5004
cf6da9b [mips][microMIPS] Implement JALS and JALRS instructions. Differential Revision: http://reviews.llvm.org/D5003
75449bc [mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions Differential Revision: http://reviews.llvm.org/D5211
94c2551 [ARM] Teach the cost model that cross-class copies are costly.
66feb63 Legalizer: Use the scalar bit width when promoting bit counting instrs on vectors.
4a93e8d Fix gcc -Wpedantic.
6354451 Add CMake check for libatomic.
8f3452d Fix an ODR violation consisting of two 'struct Query' in the global namespace.
785717c Add Tom Stellard's role as 3.5 release manager.
8f30961 llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
275458e Remove a temporary variable and just construct a unique_ptr directly using make_unique.
ddf2ec4 Object: Small cleanup in COFFObjectFile::getSymbol
a476ce7 Revert "llvm-cov: Remove an overly system specific test"
264a325 [MCJIT] Improve the "stub not found" diagnostic in RuntimeDyldChecker.
d76b9ef [Support][Endian] Overload += and -=
86ffcdd R600/SI: Fix off by 1 error in used register count
e23e570 [MCJIT] Make sure we test ARM BR24 relocations with both internal and external symbols.
cf9142d Support: Use llvm::COFF::BigObjMagic
f70f3d4 Support: Delete {aligned_,}{u,}{little,big}8_t
4be836d [C API] Make the 'lower switch' pass available via the C API.
dcc0e7e [CodeGenPrepare] Teach the addressing mode matcher how to promote zext. I.e., teach it about 'sext (zext a to ty) to ty2' => zext a to ty2.
85d436d Remove the unused string section symbol parameter from DwarfFile::emitStrings
330c819 Support: improve identify_magic to recognize COFF bigobj
8d230cd Misc cleanups to the FileSytem api.
d4604dc Add missing colon to RUN line...
24ebd0e [PATCH, PowerPC] Accept 'U' and 'X' constraints in inline asm
67868b5 [MCJIT] Add support for ARM HALF_DIFF relocations to MCJIT.
11e3755 Use simpler version of sys::fs::exists. NFC.
e257ec6 Use the simpler sys::fs:;exists. NFC.
e7d5fc9 Add triple to test to fix bots
da9bce2 Provide an implementation of getNoopForMachoTarget for SPARC.
31b1bdb Add DAG combine for shl + add of constants.
761ca13 [MCJIT] Take the relocation addend into account when applying ARM MachO VANILLA and BR24 relocations.
9869724 Added missing LLVM_NOEXCEPT to the definition of _obj2yaml_error_category::name
49f3125 [AVX512] Fix miscompile for unpack
558cd3c Add triple and remove hashes to account for buildbot differences in comment strings.
db414b0 Move constant-sized bitvector to the stack.
04bb0e7 Combine fmul vector FP constants when unsafe math is allowed.
3386922 typo
036303c R600: Add cmpxchg instruction for evergreen
1ff4485 R600: Test local atomics for evergreen
c71f7e4 R600: Add LDS_WRXCHG[_RET] instructions for Evergreen.
770b630 R600: Add LDS_MIN_[U]INT[_RET] instructions for Evergreen
bbfa901 R600: Add LDS_XOR[_RET] instructions for Evergreen
0e16268 R600: Add LDS_OR[_RET] instructions for Evergreen
9efd1eb R600: Add LDS_AND[_RET] instructions for Evergreen
8f476d2 R600: Add LDS_MAX_[U]INT[_RET] instructions for Evergreen
d7d96ee [docs] Mention character array constants in docs/LangRef.rst
c1df48d [ARM] Add Thumb-2 code size optimization regression test for LSR (register).
171bd26 [ARM] Add Thumb-2 code size optimization regression test for LSR (immediate).
d1c8395 [AArch64] Reenable the PBQP test now that the leak issue has been fixed.
993f84c [ARM] Add Thumb-2 code size optimization regression test for LSL (register).
98ff94a [ARM] Add Thumb2 code size optimization regression test for LSL (immediate).
3c1808f [x86] Fixup r217565 which baked in an assumption about the function name that breaks on some platforms. This part of the test just doesn't matter...
2c1a487 [AlignmentFromAssumptions] Don't crash just because the target is 32-bit
65aac0f Build correct vector filled with undef nodes
326018c utils: Teach lldbDataFormatters how to format ArrayRefs
463a096 [x86] FileCheck-ize this test.
b946886 Use CostPool::PoolRef typedef some more
c6b38ee shared_ptrify ownershp of PoolEntries in PBQP's CostPool
5ee5d45 R600/SI: Fix losing chain when fixing reg class of loads.
c8256c4 R600/SI: Report offset in correct units for st64 DS instructions
3f93a54 Add LLVMgold target to test dependencies.
257e85e R600: Custom lower frem
3b67055 Add doInitialization/doFinalization to DataLayoutPass.
2d81850 Enable use of __builtin_assume_aligned when self-hosting
fb42ed2 [AlignmentFromAssumptions] Don't divide by zero for unknown starting alignment
ec40716 [sphinx cleanup] Fix sphinx warning introduced by r217537
e7648ae [AArch64] Revert r216141 for cyclone
3c9c212 [PassManager] Adding Hidden attribute to EnableMLSM option
438b598 [MergedLoadStoreMotion] Move pass enabling option to PassManagerBuilder
fb862fe Fix docs reference to inexistent class.
3c278b1 Remember to eraseFromParent after replaceAllUsesWith.
c954757 Cleanup: Use the appropriate API for accessing the DIVariable of a DBG_VALUE intrinsic.
50196a8 [AArch64] Temporarily desactivate the PBQP test, while I investigate some leaks in the allocator
5e4558e Make CallingConv::ID an alias of "unsigned".
87c977a Rename getMaximumUnrollFactor -> getMaxInterleaveFactor; also rename option names controlling this variable.
5c488f4 Removed misleading comment.
9d01d42 Added missing blank
2bb4229 LangRef: @baz should be @bar in the COMDAT example
2c925e0 [AArch64] Address Chad's post commit review comments for r217504 (PBQP experimental support)
0d5440d typo
6a80022 Fix comments of createReplaceableForwardDecl() and createForwardDecl().
5ab6b15 Replace a few virtual with override.
ac67a5f [AArch64] Pacify lld buildbot complaining about an unused static function in release build.
438669c [AArch64] Add experimental PBQP support
3babc14 [AArch 64] Use a constant pool load for weak symbol references when using static relocation model and small code model.
96597a7 Add missing HWEncoding to base register class.
8c6dda0 Attempt to pacify buildbots.
01dbae1 ARM: don't size-reduce STMs using the LR register.
b3a86a0 Object: Add support for bigobj
cfae729 [mips] Remove inverted predicates from MipsSubtarget that were only used by MipsCallingConv.td
0562707 Don't attempt to run llvm-config in cmake/modules/Makefile when doing ``make clean`` because it won't be available.
b4c17e7 FunctionPassManager isn't used by the JIT anymore, it is used in clang EmitAssemblyHelper::CreatePasses() in BackendUtil.cpp.
9a86695 [mips] Return an ArrayRef from MipsCC::intArgRegs() and remove MipsCC::numIntArgRegs()
aa55210 Attempt to fix PR20884
e944e11 MergeFunctions: FunctionPtr has been renamed to FunctionNode. It's supposed to store additional pass information for current function here. That was the reason for name change.
ca31084 [asan-assembly-instrumentation] Added CFI directives to the generated instrumentation code.
77f923c Drop the W postfix on the 16-bit registers.
7d822f8 llvm-cov: Remove an overly system specific test
5672e68 [MIPS] Add aliases for sync instruction used by Octeon CPU
26f301f llvm-cov: Fix a misuse of ArrayRef::slice I introduced in r217430
c4e394a Use cast to MVT instead of EVT on a couple calls to getSizeInBits.
d453c22 [MCJIT] Remove redundant architecture check from RuntimeDyldMachOI386.
01c14f6 Sink PrevCU updating into DwarfUnit::addRange to ensure consistency
9e0dae1 Remove DwarfDebug::PrevSection, PrevCU is sufficient for handling address range holes.
589d2fc SampleProfile.cpp: Prune a stray \param added in r217437. [-Wdocumentation]
19f3868 Handle common linkage correctly in the gold plugin.
a9d7398 Add a scheduling model for AMD 16H Jaguar (btver2).
12af22e Merge alignment of common GlobalValue.
53ee51f Use armv6k default for FreeBSD/ARM
3503655 Add a test for hoisting instructions with metadata out of then/else blocks
e549e39 When merging two common GlobalValues, keep the largest.
06a533c Make this input file pass the verifier.
7b1723d Move some logic to  ModuleLinker::shouldLinkFromSource. NFC.
beab873 ScalarOpts/LLVMBuild.txt: Prune unused dependency to IPA.
1c47815 ScalarOpts/LLVMBuild.txt: Reorder.
38f37ee LLVMProfileData: Update LLVMBuild.txt corresponding to r217437.
c787184 Fix a use of an undefined value (the linkage).
ec8b573 Prefer common over weak linkage when linking.
efed46f Simplify ModuleLinker::getLinkageResult. NFC.
b3fa7e41 [mips] Add assembler support for .set mips0 directive.
40c949a Re-factor sample profile reader into lib/ProfileData.
0525381 [mips] Move MipsTargetLowering::MipsCC::regSize() to MipsSubtarget::getGPRSizeInBytes()
586994a [x32] Emit callq for CALLpcrel32
9242b13 [mips] Don't cache IsO32 and IsFP64 in MipsTargetLowering::MipsCC
4faf24b llvm-objdump: don't crash when __compact_unwind has no relocs.
f29c581 [mips] Add assembler support for .set push/pop directive.
ccfbbac ARM: Negative offset support problem
ff6eb4f llvm-cov: Use ArrayRef::slice (NFC)
3008bee [MachineSinking] Conservatively clear kill flags after coalescing.
39d5e80 llvm-cov: Combine two types that were nearly identical (NFC)
74a6025 llvm-cov: Rename MappingRegion to coverage::CountedRegion (NFC)
0868329 Set trunc store action to Expand for all X86 targets.
0acb489 llvm-cov: Try to appease MSVC after r217404
c5bdff0 Fix type error in insertvalue example in LangRef. %agg1 is of type {i32, float} and thus cannot be used where a type {i32, {float}} is expected.
78834e5 llvm-cov: Use ErrorOr rather than an error_code* (NFC)
4cd5353 Fast-ISel: Remove dead code after falling back from selecting call instructions (PR20863)
50a5cda Group unsafe fmul math folds together for easier reading. No functional change.
69062a3 llvm-cov: Remove dead code
beeca54 Don't static_cast invalid pointers
e769dc3 Be more careful in parsing Module::ModFlagBehavior value to make sure we don't do invalid load of an enum. Share the conversion code between llvm::Module implementation and the verifier.
16ee570 Fix the FIXME that was just added in r217390 - remove a bunch of redundant fold permutations.
f6ab875 group unsafe math folds together for easier reading
c3c0c6d [AArch64] Enabled AA support for Cortex-A57.
13ea374 R600/SI: Fix assertion from copying a TargetGlobalAddress
ef4bb30 R600/SI: Replace LDS atomics with no return versions
f1cd7ce R600/SI: Add InstrMapping for noret atomics.
b30d031 [AArch64] Improve AA to remove unneeded edges in the AA MI scheduling graph.
1ef487d [AArch64] Enabled AA support for Cortex-A53.
b0ef014 Add .clang-tidy configuration file to provide LLVM-optimized defaults for clang-tidy.
27ebc7c Spelling correction
feae667 Add a comment to getNewAlignmentDiff.
5f36b46 Make use @llvm.assume for loop guards in ScalarEvolution
1c0c67a Check for all known bits on ret in InstCombine
3ef1aae Make use of @llvm.assume from LazyValueInfo
1d6c2d7 Add an AlignmentFromAssumptions Pass
83d886d Add additional patterns for @llvm.assume in ValueTracking
851b04c Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.)
22f8dcb DebugInfo: Do not use DW_FORM_GNU_addr_index in skeleton CUs, GDB 7.8 errors on this.
3d03d60 Add functions for finding ephemeral values
3666e7f Add an Assumption-Tracking Pass
8ceea90 [x86] Revert my over-eager commit in r217332.
e328c5e [x86] Tweak the rules surrounding 0,0 and 1,1 v2f64 shuffles and add support for MOVDDUP which is really important for matrix multiply style operations that do lots of non-vector-aligned load and splats.
3f09227 Try to unflake AllocatorTest.TestAlignmentPastSlab
4f24001 BumpPtrAllocator: do the size check without moving any pointers
e3fc1d8 [MCJIT] Revert partial RuntimeDyldELF cleanup that was prematurely committed in r217328.
f0ad482 [MCJIT] Rewrite RuntimeDyldMachO and its derived classes to use the 'Offset' field of RelocationValueRef, rather than the 'Addend' field.
277bb8d [MCJIT] Fix a bug RuntimeDyldImpl's read/writeBytesUnaligned methods.
324a7cd R600/SI: Fix register class for some 64-bit atomics
6a712e7 R600/SI: Relax a few tests to help enable scheduler
360ed46 R600/SI: Fix broken check lines.
5f61134 MC: correct DWARF line info for PE/COFF
7cd7154 [x86] Fix a pretty horrible bug and inconsistency in the x86 asm parsing (and latent bug in the instruction definitions).
05ad067 Check whether the iterator p == the end iterator before trying to dereference it. This is a speculative fix for a failure found on the valgrind buildbot triggered by a clang test.
14b2112 Fix right shift by 64 bits detected on CXX/lex/lex.literal/lex.ext/p4.cpp test case on UBSan bootstrap bot.
1bd9f9b [docs] Document what "NFC" means in a commit message.
9a833c5 [MCJIT] Fix an iterator invalidation bug in MCJIT::finalizeObject.
469c73b [x86] Fix an embarressing bug in the INSERTPS formation code. The mask computation was totally wrong, but somehow it didn't really show up with llc.
cbbae7f [inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{' follows '~' in a clobber constraint string.
52af82d Allow vector fsub ops with constants to get the same optimizations as scalars.
e8b19ac Fix pr20078.
ea38850 Restore the ability to check if LLVMCreateObjectFile was successful
2d1c285 clean up; NFC
54543af [DWARF parser] Fix nasty memory corruption in .dwo files handling.
1455ac7 The gold tests also require ppc to be compiled in.
eaa85e2 Revert "Disable the fix for pr20793 because of a gnu ld bug."
9f1eb4d [MCJIT] Const-ify the symbol lookup operations on RuntimeDyld.
1774832 Set the parent pointer of cloned DBG_VALUE instructions correctly. Fixes PR20523.
babb451 [mips] Change Feature-related types from unsigned to uint64_t in MipsAsmParser. No functional changes.
89a7e3e R600/SI: Use same complex patterns for DS atomics
353cf20 [mips] Marked the Trap-on-Condition instructions as Mips II
f47b551 [mips] Rename data members and member functions in MipsAssemblerOptions.
286f644 R600: Fix FROUND
eb1fef0e R600/SI: Fix bug in SIInstrInfo::legalizeOpWithMove()
7cda2d0 R600/SI: Use S_ADD_U32 and S_SUB_U32 for low half of 64-bit operations
c1c5dcf [x86] Factor out the zero vector insertion logic in the new vector shuffle lowering for integer vectors and share it from v4i32, v8i16, and v16i8 code paths.
4b5f105 ARM: cover all sub-architecture enumerators to keep compiler happy.
94f5d44 [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.
eeb0520 Reapply "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
e80ca34 Removed white-space
a1fddc5 Adding kalimba variants as Triple sub-architectures. Reviewed in:
163462e InstCombine: Remove a special case pattern
0452bfd Minor typo.
7da07d7 MC: correct DWARF header for PE/COFF assembly input
b20b9bf [AArch64] Add pass to enable additional comparison optimizations by CSE.
7935e70 [CMake] Add -fno-sanitize=function to UBSan bootstrap
6cf4a0f Disable the fix for pr20793 because of a gnu ld bug.
27589ac Refactor to avoid code duplication. NFC.
295a008 Fix pr20793.
edee9e8 Post-JIT light cleanup of ExecutionEngine.h: edited comments about the JIT, removed runJITOnFunction and isLazyCompilationDisabled.
a49caa5 [ dwarfdump ] Add symbolic dump of known DWARF attribute values.
4b2e523 Revert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
e4e2997 [dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()
1e57cae Fix use-after-move introduced in r217065 and caught in post-commit review by Alexey.
91c286e unique_ptrify RuntimeDyld::Dyld
b9cb76d MC Win64: Put unwind info for COMDAT code into the same COMDAT group
54dfc53 Removed the ctime printed “time stamp” from macho-private-headers.test to fix the builds.
f2cdc0b X86: cpuid and xgetbv write to 32-bit registers, not 64-bit
37598b6 Adds the next bit of support for llvm-objdump’s -private-headers for executable Mach-O files.
a696808 Fix link to 3.5 release notes.
8dcac5d AArch64: fix vector-immediate BIC/ORR on big-endian devices.
d3a511e build/cmake: Fix CMP0023 warning with libffi
0f8b579 [mips] Rename MipsAsmParser functions to conform to the LLVM Coding Standards. No functional changes.
1c9848f Enable noalias metadata by default and swap the order of the SLP and Loop vectorizers by default.
fa9120f Silencing a usually-helpful-but-braindead-silly-in-this-case sign mismatch warning with MSVC. NFC.
dfe4e3e AArch64: fix big-endian immediate materialisation
ae98867 [x86] Teach the new v4i32 shuffle lowering some more tricks to recognize vzext patterns and insert-element patterns that for SSE4 have dedicated instructions.
a916007 Fixed compilation problem on Windows (initialization of non-aggregate type). After commit 217131.
b4f4dd4 [GVN] Format variable name.
a41fd4f Fix build faliure introduced by r217129.
df1bc5a X86 Intrinsics table - changed to a static table sorted by intrinsic id. Used binary search over the tables.
1711064 Rename DWARFContext::getLineTableForCompileUnit to getLineTableForUnit.
b81715a Add DWARFFormValue::getAsBlock() and add FC_Flag as an acceptable class for an unsigned constant.
a1f7715 Add a DWARFContext& member in DWARFUnit.
21797d6 [MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.
7125897 Use vector constructor instead of a for loop to initialize entries.
5ade584 [MCJIT] Add command-line argument to llvm-rtdyld to specify target addresses for sections.
cd72c21 Revert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses."
319b5d0 [FastISel][AArch64] Cleanup and simplify 'fastSelectInstruction'. NFC.
68a4ab0 [FastISel][AArch64] Add target-specific lowering for logical operations.
fa2dfae [x86] Teach the new vector shuffle lowering about the zero masking abilities of INSERTPS which are really powerful and come up in very important contexts such as forming diagonal matrices, etc.
e35ac41 IndVarSimplify: Address review comments for r217102
b79ed97 llvm-cov: Don't pointlessly create a unique_ptr (NFC)
c7ad7ec Revert accidentally committed r217107
fa2e31c R600/SI: Un-move pattern I forgot to remove in last commit
c9cc488 R600/SI: Try to keep i32 mul on SALU
017c14e Don't treat 0 as a special value for int attributes.
c9b2548 [asan] fix debug info produced for asan-coverage=2
901166c Enabling LLVM & Clang to be cross-compiled using CMake from a single configuration command line
c0f2b8b IndVarSimplify: Don't let LFTR compare against a poison value
699fd19 [x86] Teach the new vector shuffle lowering about the simplest of 'insertps' patterns.
5f20963 [x86] Teach the asm comment printing to only print the clarification of an immediate operand when we don't have instruction-specific comments.
f12b1d8 [asan] add -asan-coverage=3: instrument all blocks and critical edges.
1c71488 unique_ptrify RuntimeDyldImpl::loadObject
1ad925c Refactor AtomicExpandPass and add a generic isAtomic() method to Instruction
f0644b4 Make some helpers static or move into the llvm namespace.
4b2698c Use target-dependent emitLeading/TrailingFence instead of the target-independent insertLeading/TrailingFence (in AtomicExpandPass)
ecadea9 [FastISel][tblgen] Rename tblgen generated FastISel functions. NFC.
6042034 [FastISel] Rename public visible FastISel functions. NFC.
e361d51 [JIT] Add an out-of-line definition for the virtual destructor in JITEventListener. This used to be in the old JIT (last line of the file) and everyone just "happened" to pick it up from there. =/ Doh.
36cf5d6 [x86] Add an SSE4.1 mode to this test.
5b7ae59 Remove resetSubtargetFeatures as it is unused.
c24df45 Remove unnecessary getTarget call now that the subtarget is cached on the machine function.
8bf2a84 house cleaning: "Don’t duplicate function or class name at the beginning of the comment."
52fa0d0 Add writeFileWithSystemEncoding to LibLLVMSuppor.
3693c29 unique_ptrify MCJIT::emitObject
96a8ccf unique_ptrify a bunch of stuff through RuntimeDyld::loadObject
87508f1 [x86] Make this test check everything for both SSE2 and AVX1 modes, using a common 'all' prefix for the common test output.
39af4e6 [FastISel] Some long overdue spring cleaning of FastISel.
75899aa Fix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T>, Foo>.
07ad198 Add a regression test to sanity check the PBQP allocator.
faa7461 unique_ptrify IRObjectFile::createIRObjectFile
1892eab [FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.
b9053f6 Removing static initializer from Debug.cpp by converting to a ManagedStatic.
413eadf unique_ptrify MachOUniversalBinary::create
b89304e Preserve IR flags (nsw, nuw, exact, fast-math) in SLP vectorizer (PR20802).
6d66a1c Pass a && to getLazyBitcodeModule.
38a4f3b Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type.
c359193 Update to not depend on "llvm-objdump -d -symbolize".
ce4caf1 R600/SI: Add a pattern for i64 and in a branch
2381dfe R600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()
218805d Check-label a bit more specific
b9f3466 Document !and. Fix !shl and friends -- they provide binary operations.
b449c28 Fix configure and make build of llvm examples.
a80ff26 Add override to overriden virtual methods, remove virtual keywords.
8f2394e Fix ambiguous call to make_unique and clang-format.
42ebff8 Follow-up for r217020: actually commit the fix for PR20800, revert the accidentally committed changes to LLVMSymbolize.cpp
fac68d2 Fix PR20800: correctly calculate the offset of the subq instruction when generating compact unwind info.
8475470 Reapply r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR.""
732b026 Recommit "Use unique_ptr to manager FilterChooser ownership."
6426140 Revert "Use unique_ptr to manager FilterChooser ownership."
e2d4093 Use unique_ptr to manager FilterChooser ownership.
5c581578 Implement move constructor and remove copy constructor for Filter objects in FixedLenDecoderEmitter. Also remove unused copy constructor of FilterChooser.
ef279f9 [MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentally left out of r217010).
5ae2647 [MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.
dd7a710 [FastISel][AArch64] Add target-dependent instruction selection for Add/Sub.
46d52b1 Fix test case to match correct llvm-objdump output
3ab3a82 Replace printf with outs() <<
ae77bf4 Change name of copyFlags() to copyIRFlags(). Add convenience method for logical 'and' of all flags. NFC.
fbe935e [CFLAA] Remove one final initializer list
b38c0b8 [CFLAA] And even more MSVC fixes
16632ce Cleaning up remaining static initializers in Signals.inc
fa5d491 [CFLAA] More cleanup for MSVC
0a304f0 Tablegen scheduling models don't reference empty itineraries as of r216919, so don't emit the unused itinerary variables
8de4282 [CFLAA] No initializer lists for MSVC
418103c Missing test from r216989
ddcf3bd0a Only emit movw on ARMv6T2+
4becee1 unique_ptrify passing the TargetMachine to ExecutionEngine::MCJITCtor
41b6e32 [CFLAA] Remove tautological comparison
79ec2ed [FastISel][AArch64] Use the target-dependent selection code for shifts first.
4919b69 [FastISel][AArch64] Use a new helper function to determine if a value type is supported. NFCI.
73d86aa Nuke MCAnalysis.
d5dd8ce Reinstate "Nuke the old JIT." Approved by Jim Grosbach, Lang Hames, Rafael Espindola.
4437658 [CFLAA] LLVM_CONSTEXPR -> const
76b55cc [X86] Allow atomic operations using immediates to avoid using a register
ba70909 [CFLAA] constexpr -> LLVM_CONSTEXPR
e1b1cac Add pass-manager flags to use CFL AA
d52e9a1 BumpPtrAllocator: use uintptr_t when aligning addresses to avoid undefined behaviour
891198b [asan]  Assign a low branch weight to ASan's slow path, patch by Jonas Wagner. This speeds up asan (at least on SPEC) by 1%-5% or more. Also fix lint in dfsan.
2aab51a R600/SI: Relax some ordering in tests.
bf301d5 Add a CFL Alias Analysis implementation
a2e22cd [FastISel][AArch64] Move over to target-dependent instruction selection only.
37753c5 [FastISel] Provide the option to skip target-independent instruction selection. NFC.
cb25224 Generate extract for in-tree uses if the use is scalar operand in vectorized instruction. radar://18144665
9c21df6 R600/SI: Fix hardcoded register numbers in test
96b466c Refactor LowerFABS and LowerFNEG into one function (x86) (NFC)
ef02f8e cmake: Don't reject unknown cpp files that start with .
cc99164 Fix MemoryDependenceAnalysis in cases where QueryInstr is a CmpXchg or a AtomicRMW
4211bbc Fix a logic bug when copying fast-math flags.
6cae39f Add a note about AuroraUX to the release notes.
f9139d7 Add note to documentation about machine node chains.
f471c48 R600/SI: Add failing testcase.
f7a3c7e Fix interference caused by fmul 2, x -> fadd x, x
9bf0327 Code review tweaks
0565503 Fix crash when looking up the addrspace of GEPs with vector types
f93099e CodeGen: Handle va_start in the entry block
1c7650f Fix comment and unnecessary check for FP build_vectors.
fc5b232 unique_ptrify LTOCodeGenerator::NativeObjectFile
7b96c49 unique_ptrify the result of SpecialCaseList::create
fb9a3fb MCSchedule.h: fix VS2012 build after r216919
98f518c unique_ptrify FileOutputBuffer::FileOutputBuffer
60a82bc Fix left shifts of negative values in MipsDisassembler.
6de6c6a Change MCSchedModel to be a struct of statically initialized data.
ac31076 unique_ptrify PBQPBuilder::build
93accb4 Fix signed integer overflow in PPCInstPrinter.
7bda613 Correct unique_ptr passing in MCObjectDisassembler::setFallbackRegion
251da88 Fix left shifts by too large exponents in MCParser (which happened only on error recovery path).
ca514a4 Revert: [APFloat] Fixed a bug in method 'fusedMultiplyAdd'.
0b6ee9f [APFloat] Fixed a bug in method 'fusedMultiplyAdd'.
a778b5e Add missing override on ARMAsmBackend's dtor.
9e1f653 LICM: Don't crash when an instruction is used by an unreachable BB
4648487 Fix left shifts of negative integers in AArch64 InstPrinter/Disassembler
2633f79 Enable splitting indexing from loads with TargetConstants
1e556a8 Replace -use-init-array with -use-ctors.
edc658d Silencing an MSVC C4334 warning ('<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)). NFC.
4e2b661 Merge Extend and Shift into a UBFX
3da41a2 Revert "Revert '[DAGCombiner] Split up an indexed load if only the base pointer value is live'"
dea837d [PowerPC] Guard against illegal selection of add for TargetConstant operands
901a341 CodeGen: indicate Windows unwind data format
05c3ddf CodeGen: split out the Win64Exception emitter
0c1740c MC: remove unnecessary enumeration prefix
e64e7c4 SROA: Don't insert instructions before a PHI
a0b2af4 Revert "Revert two GEP-related InstCombine commits"
3c7bd3f Use an integer constant for FABS / FNEG (x86).
73f8eff Add a convenience method to copy wrapping, exact, and fast-math flags (NFC).
88350bf Fix a typo in comments in r216862, NFC
4016a9e [ARM] Add Thumb-2 code size optimization regression test for EOR.
9e6f09d ARM] Add Thumb-2 code size optimization regression test for BIC.
861eddb [asan-assembly-instrumentation] Prologue and epilogue are moved out from InstrumentMemOperand().
09e28e3 Thumb2 M-class MSR instruction support changes
7948290 Fix in InlineSpiller to make the rematerilization loop also consider implicit uses of the whole register when a sub register is defined.
c642ad9 Revert "[asan-assembly-instrumentation] Prologue and epilogue are moved out from InstrumentMemOperand()."
1faa445 Fix a really bad miscompile introduced in r216865 - the else-if logic chain became completely broken here as *all* intrinsic users ended up being skipped, and the ones that seemed to be singled out were actually the exact wrong set.
35b114f Small refactor on VectorizerHint for deduplication
895aa39 [asan-assembly-instrumentation] Prologue and epilogue are moved out from InstrumentMemOperand().
32418db Feed AA to the inliner and use AA->getModRefBehavior in AddAliasScopeMetadata
0cbef49 Ignore lifetime intrinsics in use list for MemCpyOptimizer. Patch by Luqman Aden, review by Hal Finkel.
7ba4e07 Remove an errant outer loop that contains nothing but an inner loop over exactly the same elements. While no functionality is change intended (and hence there are no changes to tests), you don't want to skip this revision if bisecting for errors.
5581563 Fix AddAliasScopeMetadata again - alias.scope must be a complete description
d43e6df [MachineSink] Use the real post dominator tree
e2cf6dc DebugInfo: Elide lexical scopes which only contain other (inline or lexical) scopes.
30392bf Consider addrspaces in canLosslesslyBitCastTo()
363d0d2 DebugInfo: Move argument creation up into the caller that's unambiguously handling the subprogram scope (replacing a conditional with an assertion in the process)
4b538d3 Delay adding imported entity DIEs to the lexical scope, streamlining the check for "this scope has nothing in it"
677ae42 Modify DwarfDebug::constructImportedEntityDIE to return rather than insert into the scope
ba466e6 Refactor constructImportedEntityDIE(DwarfUnit, DIImportedEntity) to return a DIE rather than inserting it into a specified context.
b8ee7c2 Simplify expression using container's front() rather than begin()->
07f3526 Add some negative (and positive) static_assert checks for ArrayRef-of-pointer conversions introduced in r216709
6e153ad [PATCH][Interpreter] Add missing FP intrinsic lowering.
d421075 Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream.
3af1356 Remove 'virtual' keyword from methods markedwith 'override' keyword.
847998f Use StringRef to avoid copies and simplify code.
8316713 Add a test for converting ArrayRef<T *> to ArrayRef<const T *>.
24ae56d Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.
7ee57cc JIT support has been added awhile ago.
bd896c1 Fix AddAliasScopeMetadata to not add scopes when deriving from unknown pointers
b265e6f InstCombine: Respect recursion depth in visitUDivOperand
c6219ba InstCombine: Try harder to combine icmp instructions
bcbae3d Revert r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR."
77c2eb2 Fixed a build problem when there were headers for a different LLVM present in the system header lookup path.
23e2653 Add missing const to StringRef.copy()
fbf47c2 Fix typo and formatting
aa4d2ac Object/llvm-objdump: allow dumping of mach-o exports trie
4e92383 [MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR.
e7f301e [FastISel][AArch64] Use the correct register class for branches.
bc420a0 [MachineSinking] Clear kill flag of all operands at all their uses.
361153e [MCJIT] Move endian-aware read/writes from RuntimeDyldMachO into RuntimeDyldImpl.
4b9f3c1 Debug info: Add a new explicit DIDescriptor flag for the "public" access specifier and change the default behavior to only emit the DW_AT_accessibility(public) attribute when the isPublic() is explicitly set.
794003c Comment only: Annotate loop as per mailing list discussion
c5198dc Make isValidMCLOHType take unsigned instead of enum to avoid loading invalid enum values
e306159 Next bit of support for llvm-objdump’s -private-headers for Mach-O files.
61123cf AArch64: Silence -Wabsolute-value warning with std::abs
e038aca Speculative build fix for const, gcc, and ArrayRef overloads
3f4b69d Revert accidentally committed patches r216787-r216789
3da7647 Add a trivial functor for use with unique_ptrs managing memory that needs to be freed rather than deleted.
a2fa271 Omit DW_AT_artificial, DW_AT_external, and similar attributes under -gmlt
0f155c1 Omit dwarf::DW_AT_frame_base under -gmlt
a66ce7a Stuff
217b38e Fix typos in comments, NFC
039f6c6 Add a const and munge some comments
9436574 musttail: Forward regparms of variadic functions on x86_64
dae2873 Verifier: Don't reject varargs callee cleanup functions
6393b3a Remove spurious mask operations from AArch64 add->compares on 16 and 8 bit values
1469e29 X86: Fix conflict over ESI between base register and rep;movsl
e8b65bc another typo
da0bc1c typo
66b380b Relax the constraint more in MemoryDependencyAnalysis.cpp
22f3cb0 [X86] Refactor X86ISelDAGToDAG::SelectAtomicLoadArith - NFC
f1b5734c Add missing mach-o EXPORT_SYMBOL_FLAG_KIND_ABSOLUTE
1da4862 Tablegen fixes for new syntax when initializing bits from variables. Followup to r215086.
d8835d0 [FastISel][AArch64] Fix an incorrect kill flag due to a bug in SelectTrunc.
59758c4 [ARM] Add Thumb-2 code size optimization test for ASR (register).
b1424d7 [ARM] Add Thumb-2 code size optimization test for ASR (immediate).
4f66dd7 Fix a typo in AddAliasScopeMetadata
0d90962 Make fabs safe to speculatively execute
f4d57e7 R600/SI: Use mad for fsub + fmul
1e77dc8 AArch64: only try to get operand of a known node.
d1c5443 Remove unnecessary regex in test pattern per dblaikie suggestion.
86cafbc typo
87a2b36 [NVPTX] Make the alignment an explicit argument to ldu/ldg
c5484a2 [ARM] Make Thumb-2 code size optimization test more strict.
f238c18 [ARM] Add a first test for the Thumb-2 code size optimization pass.
1f70cb9 AArch64: skip select/setcc combine in complex case.
123c92c [AArch64] FPLoadBalancing: move ownership of the chain to its current accumulator register
622de3b Use DwarfDebug::attachLowHighPC for the compilation unit DIE.
37e671e [SKX] Enable lowering of integer CMP operations. Added new types to Legalizer. Fixed getSetCCResultType function Added lowering tests.
d2323fc Do not assume the value passed to memset is an i32.
95f7e2d Add conversion constructor to convert ArrayRef<T*> to ArrayRef<const T*>. Reviewed with Chandler and David Blaikie.
3cd73a5 [AArch64] Fix some failures exposed by value type v4f16 and v8f16.
d814e38 Cleaning up static initializers in Signals.inc
77bf4f9 Cleaning up static initializers in TimeValue.
79e9b30 Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.
cf45151 [FastISel][AArch64] Don't fold instructions that are not in the same basic block.
6acfc54 Revert two GEP-related InstCombine commits
8f58e02 Don't promote byval pointer arguments when padding matters
0d34b1e AArch64: More correctly constrain target vector extend lowering.
179b5ee Move FNEG next to FABS and make them more similar, so it's easier that they can be refactored. NFC.
4bb5350 On MachO, don't put non-private constants in mergeable sections.
8317095 Constify MCSymbol* parameters to DwarfDebug::attachLowHighPC.
cf9661c Fix a logic bug in x86 vector codegen: sext (zext (x) ) != sext (x) (PR20472).
538b1cb Do not introduce new shuffle patterns after operation legalization if SHUFFLE_VECTOR was marked custom.  The target independent DAG combine has no way to know if the shuffles it is introducing are ones that the target could support or not.
98491c0 Janitorial services: "Don’t duplicate function or class name at the beginning of the comment."
e43c262 Remove local TLI vars that are just duplicates of the class var. No functional change.
a63b6e2 Use local vars to improve readability. No functional change.
4152f8d Minor spelling correction.
6948f9e Silence a -Wsign-compare warning. NFC.
e9c80bc [PBQP] Only output debug information when requested
0b16ed7 InstCombine: Remove redundant combines
c84ba85 Fix: SLPVectorizer tried to move an instruction which was replaced by a vector instruction.
5ca7935 Generate CMN when comparing a short int with minus
cf37360 Test commit.  Fix whitespace from a previous patch of mine.
41db812 [MCJIT] Fix format specifiers for debug output in RuntimeDyld.
5283829 MC: Don't crash when the COFF section limit is reached
dccb2af [x86] Fix whitespace and formatting around this function with clang-format, no functionality changed.
6abd62f [x86] Hoist conditions from *every single if* in this routine to a single early exit.
1201cc1 [x86] Inline an SSE4 helper function for INSERT_VECTOR_ELT lowering, no functionality changed.
da3a293 [x86] Clean up some tests to use FileCheck and combine two into a single file.
b11fff1 InstSimplify: Move a transform from InstCombine to InstSimplify
4a76317 [FastISel] Undo phi node updates when falling-back to SelectionDAG.
d24494d [FastISel]
a26b1bd Revert "[FastISel][AArch64] Don't fold instructions too aggressively into the memory operation."
34ea0a1 Fix unaligned reads/writes in X86JIT and RuntimeDyldELF.
1f5263e [FastISel][AArch64] Don't fold instructions too aggressively into the memory operation.
96c845a Avoid zero length memset error
a160df5 Use local variable in visitFADD. No functional change.
2c4b9ea [FastISel][AArch64] Fix a comment in my previous commit (r216617).
ccf5301 [FastISel][AArch64] Fix simplify address when the address comes from a shift.
aa9db69 Fix a double free in llvm::getBitcodeTargetTriple.
d445e4a [FastISel][AArch64] Use the zero register for stores.
305938e Group unsafe-math optimizations for fsub into one block. No functional change.
fc68dad [FastISel] Fix a potential bug in FastEmitInst_ri
5b92f44 Use local variable to improve readability.
644da32 typo in comment
b5e9bf0 Don't create a MemoryBuffer just to get the MemoryBufferRef. NFC.
819242a Convert a few more cases of direct intialization of unique_ptrs from MemoryBuffer::getMemBuffer to move initialization now that it returns by unique_ptr instead of raw pointer.
2ab3b56 X86 MC: Handle instructions like fxsave that match multiple operand sizes
8ee308f InstCombine: Combine gep X, (Y-X) to Y
48164ed InstSimplify: Don't simplify gep X, (Y-X) to Y if types differ
1c76881 Reland r216439 215441, majnemer has a real fix for PR20771.
1a7f705 Return a std::unique_ptr when creating a new MemoryBuffer.
b2f7183 Revert r216439 (and r216441, else the former doesn't revert cleanly).
e18e2a8 Remove unused argument.
e909464 Use BitVector instead of int in R600 SIISelLowering. int may not have enough bits in it, which was detected by UBSan bootstrap (it reported left shift by a too large constant).
34806d2 yaml::Stream doesn't need to take ownership of the buffer.
7132e32 Fix some semantic usability issues with DynamicLibrary.
d8e448b InstSimplify: Compute comparison ranges for left shift instructions
0927dab Revert "Limit the symbol search in DynamicLibrary to the module that was opened."
95141f9 [MCJIT] Replace a C-style cast in RuntimeDyldImpl.h.
644e3c07 [MCJIT] More endianness fixes for RuntimeDyldMachO.
70d2d3c Limit the symbol search in DynamicLibrary to the module that was opened.
5e487f8 Teach the AArch64 backend about v4f16 and v8f16
b8c95a8 [SLP] Re-enable vectorization of GEP expressions (re-apply r210342 with a fix).
fda6b88 Clang-format over X86AsmInstrumentation.* with LLVM style.
ccce703 Add an explicit cast to pacify implicit boolean conversion warnings.
7e3dc40 [x86] Fix a regression introduced with r213897 for 32-bit targets where we stopped efficiently lowering sextload using the SSE41 instructions for that operation.
963a5e6 [SDAG] Re-instate r215611 with a fix to a pesky X86 DAG combine.
08cb02e Clang-format over X86AsmInstrumentation.*.
e79a94a [SKX] Added new versions of cmp instructions in avx512_icmp_cc multiclass, added VL multiclass. Added encoding tests
fe0c6ea AVX-512: Added intrinsic for VMOVSS store form with mask.
3512034 Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.
16edb0e Fix some cases were ArrayRefs were being passed by reference. Also remove 'const' from some other ArrayRef uses since its implicitly const already.
dd5456b InstCombine: Optimize GEP's involving ptrtoint better
ad2a271 Remove type unit skeletons. GDB no longer needs them & this saves a heap of space.
fc03e72 [FastISel][AArch64] Fix address simplification.
836f4bd [FastISel][AArch64] Fold Sign-/Zero-Extend into the shift immediate instruction.
c04b786 Fix a couple of debug info test cases to match the metadata schema change in r216239
fb1af0a Pass a std::unique_ptr<MemoryBuffer>& to getLazyBitcodeModule.
2292996 Pass a MemoryBufferRef when we can avoid taking ownership.
af07403 Give ExecutionEngine of top level buffers.
3c92309 MC: Split the x86 asm matcher implementations by dialect
1d5cdfd Revert r210342 and r210343, add test case for the crasher. PR 20642.
a5718c6 Convert MC command line option for fatal assembler warnings into a proper flag.
de2d08e Invert the condition to have a single return.
81e4992 Return a std::unique_ptr from the IRReader.h functions. NFC.
1bfd87a Return a std::unique_ptr from parseInputFile and propagate. NFC.
85ae5fc Simplify LTOModule::makeLTOModule a bit. NFC.
9be4884 Merge TempDir and system_temp_directory.
083c9de Silence unused function warning in Release builds.
698eabd Change the return value of "getEnd()" from a MachineInstr* to a MachineBasicBlock::iterator.
2282afa ARM: Add patterns for dbg
52c92df This patch enables SimplifyUsingDistributiveLaws() to handle following pattens.
647d329 Use 'xz' compression instead of 'gz'.
8058ffe InstSimplify: Fold gep X, (sub 0, ptrtoint(X)) to null
594e4a1 InstSimplify: Simplify trivial pointer expressions like b + (e - b)
2db57b4 AArch64: use std::fill instead of memset
4a3195c Revert "AArch64: use std::vector for temp array"
7532912 Analysis: cleanup
8cb2706 Revert "Analysis: unique_ptr-ify DependenceAnalysis::collectCoeffInfo"
ce0adaa Revert "NVPTX: remove another raw delete call"
ae65d0e Revert "Support/APFloat: unique_ptr-ify temp arrays"
27dc1b8 Revert "Support/Path: remove raw delete"
759a71a ExecutionEngine: address review comments
71499d3 CodeGen/LiveVariables: use vector::assign()
fad8d81 musttail: Don't eliminate varargs packs if there is a forwarding call
18637be fix typos in comments
44b3a0b Declare that musttail calls in variadic functions forward the ellipsis
64bb4a6 Fix Path unittests on Windows after raw_fd_ostream changes
9d1f8b1 ArgPromotion: Don't touch variadic functions
9fe621a [MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.
c33fe1b Fix bug in llvm::sys::argumentsFitWithinSystemLimits().
476f243 [MCJIT] Dump section memory both before and after relocations are applied.
749c738 Refactor argument serialization logic when executing process. NFC.
670885e [FastISel][AArch64] Refactor float zero materialization. NFCI.
f9526ac [MCJIT] Make RuntimeDyld dump section contents in -debug mode.
8c96862 Modernize raw_fd_ostream's constructor a bit.
a4c8f31 [x86] Fix a bug in r216319 where I was missing a 'break'.
ff69509 Remove dangling initializers in GlobalDCE
a696ccb Rise from the dead and update personal info
373fc00 [AArch32] Add patterns for VCVT{A,N,P,M}.

git-subtree-dir: llvm
git-subtree-split: 57a73c27b1a078a689a965289c8152a21dcedc69
Merge commit '220104d9b1acfb3e69cb2aaccc048655671b62b8' into devel
Squashed 'llvm/tools/clang/' changes from 8942b6d..663b4dd

663b4dd When pretty printing attributes that have enumeration arguments, print the enumerator identifier (as a string literal) instead of the internal enumerator integral value.
0454256 Edit: Do not extend a removal to include trailing whitespace if we're at the end of the file.
04fdc2f [ARM] Add ACLE predefines: maxmin, rounding and h/w integer division
28377e0 clang-format: Basic support for Java.
742a11d clang-format: Add option to break before non-assignment operators.
3a8b0f3 Make test/Driver hermetic
310a09e Check delegating constructors for using uninitialized fields.
9c38a33 clang-cl: Warn when a /TC or /TP argument is unused
54be4c5 Don't print 'NULL TYPE' when dumping a delegating constructor.
6588d9f Allow protocols to be just declared.
c419beb patch to add missing warning on sizeof wrong parameter for __builtin___strlcpy_chk/__builtin___strlcat_chk. Patch by Jacques Fortier with monir change by me and addition of test. rdar://18259539
423b6f8 clang-cl: Don't treat linker input files differently when /TP or /TC is specified.
4722a19 No need to use PNaCl's calling convention since PNaCl now uses a separate approach for calling conventions.
072d5c6 Fix copy/paste for test, the triple should be le64-unknown-unknown
4a7baa1 Add support for le64.
18920bf clang-format: Improve line breaks at function calls.
4b4db34 Add a previously-missing test case for return adjustment vs pure virtual methods
cecb89c [ASan/Win] Fix PR20918 -- SEH handler doesn't work with the MD runtime
a896fbe Update the test case after r217673
6a75357 [ASan/Win] Rename asan_win_uar_thunk.lib to asan_win_dynamic_runtime_thunk.lib
a06010e Fixing a -Woverflow warning from GCC by using a more natural datatype for this operation. NFC.
a68f818 Every code owner should be reachable via email, so add one for Douglas Gregor and Ted Kremenek.
9f51fe8 Use unique_ptr for ScratchBuf and PragmaHandlers in the preprocessor.
fee0818 MS ABI: The latest VC "14" CTP implements deleted virtual functions
82903d6 MS ABI: Use the correct this arg when generating implict copy ctor
37e48be Thread Safety Analysis: Avoid infinite recursion in an operator<<
d249004 Objective-C. Under a special flag, -Wcstring-format-directive, off by default, issue a warning if %s directive is used in formart argument of a function/method declared as __attribute__((format(CF/NSString, ...))) To complete rdar://18182443
6da9fc6 clang-cl: Add support for the /o option for object files, executables, and preprocessor output
25f52a3 Use the simpler version of llvm::sys::fs::exists.
1e0b869 Update C++ status page to reflect that Clang 3.5 has released.
753a43b Update DR status list to reflect that Clang 3.5 has been released.
33164b6 Tests for DR573-580.
9b9fda5 Merge GetAddrOfCXXConstructor and GetAddrOfCXXDonstructor. NFC.
ad74086 Fix bug 20892 - clang-format does not handle C-style comments
5c3181a Avoid some unnecessary SmallVector copies.
7e6e836 NULL->nullptr
c5aa49f Fix a couple of -Wsign-compare warnings introduced in r217556
1c11b7c Thread Safety Analysis: major update to thread safety TIL. Numerous changes, including:   * Changed the way variables and instructions are handled in basic blocks to     be more efficient.   * Eliminated SExprRef.   * Simplified futures.   * Fixed documentation.   * Compute dominator and post dominator trees.
b406706 More test for "void *" argument as index of a dictionary literal.
ba3a559 Remove a couple of fixed paths that snuck into my test from 217550
b1f0f8a Avoid a couple of assertions when preprocessing with modules
2e49ba2 Update for llvm api change.
621b515 Only override the target architecture on -m32 and friends if it is actually different. Fixes a surprising link error with nodejs on rpi, where armv6-netbsd-eabihf turned into armv5e-netbsd-eabihf, which doesn't lacks the necessary VFP support.
4c10fa8 Objective-C. Accept 'nil' as indexing argument to dictionary literals since the API which implements them accepts it too.  // rdar://18254621
8b2a751 MS ABI: Emit dynamic initializers for selectany globals in comdat-associative sections (PR20889)
ddcb8c1 Objective-C arc. Fixes a crash when issuing diagnostic for passing parameter to an audited CF API. rdar://18222007
7289c42 [sphinx cleanup] Fix sphinx warning introduced by r217501.
105e611 Recognize .lib files as linker input explicitly
bdea08b Add a test for an operator access decl.
acacee5 typo
c279e01 [analyzer] Fix pthread lock tests so that the API comes from a system header.
c661f60 clang-format: Add option to allow short case labels on a single line.
70b4a91 CodeGen: Use a fixed alignment for vtables.
0903978 Revert over-eager unique_ptr conversion.
c6da4d1 Unique_ptrify PPCallbacks ownership.
98045aa Don't crash on access decls with invalid scope specifier, PR20887.
d6d59f0 Objective-C. Under a special flag, -Wcstring-format-directive, off by default, issue a warning if %s directive is used in certain CF/NS formatting APIs, to assist user in deprecating use of such %s in these APIs. rdar://18182443
4c4ef1f Teach the analyzer that __builtin_assume_aligned returns its first argument.
d0f0489 clang-format: [JS] Support regex literals with trailing escaped slash.
62d3f3f Tooling: Ignore file names in tooling::deduplicate.
885f514 Allow empty statements in naked functions in addition to ASM statements
c48ed9a Fix PCHs that import more than one module
fd957f1 Report source location of returns_nonnull attribute in UBSan reports.
565e4df Implement nonnull-attribute sanitizer
f3fc6e6 Remove a parameter that has been unused since r188481. No behavior change.
1c7a745 Make FileEntry::getName() valid across calls to FileManager::getFile()
1c96eff Add a comment for something that confused me.
422fddb Handle constructors and destructors a bit more uniformly in CodeGen.
18cb1a9 Add .clang-tidy configuration file to provide LLVM-optimized defaults for clang-tidy.
0e59cbe clang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.
082c713 Don't test really-large alignments for now
687b32e Add __builtin_assume and __builtin_assume_aligned using @llvm.assume.
e712887 Adjust test/CodeGenCXX/pr12251.cpp
2715e00 Avoid writing to the test directory as it may not be writable.
1bd7f03 Fix test to not write output to the test directory, as it may not be writable.
4deb992 Try to green test/Sema/format-strings.c on Win bots
399adce MS format strings: parse the 'Z' printf conversion specifier (PR20808)
e40196b Move x86-specific bits of warn-unused-local-typedef.cpp into their own file.
4b8073f Attempt to fix ARM bot. (The test references a typedef from x86 asm.)
a48d2cd [x86] Clean up the x86 builtin specs to reflect r217310 in LLVM which made the 8-bit masks actually 8-bit arguments to these intrinsics.
7d14568 Add error, recovery and fixit for "~A::A() {...}".
4f2a6d6 Add -Wunused-local-typedef, a warning that finds unused local typedefs.
06260b8 Reword switch/goto diagnostics "protected scope" diagnostics. Making up a term "protected scope" is very unhelpful here and actively confuses users. Instead, simply state the nature of the problem in the diagnostic: we cannot jump from here to there. The notes explain nicely why not.
1e2542d Fix r217275 to work without the need for standard headers being included
55460b6 Move the initialization of VAListTagName after InitializeSema()
648414a Separate the matchers by type and statically dispatch to the right list.
263a25d Require an x86 target for ms-inline-asm-return.cpp instead of XFAIL
b306e0b -frewrite-includes: Normalize line endings to match the main source file
3e4e598 [analyzer] Don't crash if malloc() has an unexpected function prototype.
2dd5c2d [ARMv8] Add support for 32-bit MIN/MAXNM and directed rounding.
1deae20 Mark ms-inline-asm as xfail on ARM
664ce27 clang-format: [JS] Format embedded function literals more efficently.
a1290a6 clang-format: [JS] JavaScript does not have the */&/&& madness.
b69f76c clang-format: [JS] Better support for empty function literals.
dba46d9 clang-format: [JS] Fix indentation in dict literals.
843517d clang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not x64 but x86.
77f909b Remove suppression of dr547 test and instead test that deduction succeeds if we use __thiscall. (This doesn't actually work for MSVC; they don't allow the __thiscall qualifier here, but it's sufficient to demonstrate that we do implement the intent of the DR.)
d18cdb5 unique_ptrify AnalysisConsumer.cpp::CreateUbiViz
db7770b Remove a use of raw pointer ownership (then non-ownership) in TrimmedGraph::popNextReportGraph
c108908 Fix comment indentation.
71c9828 unique_ptrify ExplodedGraph::trim
bb458b6 unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator
cb5694c unique_ptrify BugReporter::visitors
ff29cb2 clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 also for MinGW
2b61507 Stop double visiting some expressions during self reference checking.
e0e727e Don't allow inline asm statements to reference parameters in naked functions
5417edc Don't allow non-ASM statements in naked functions
60de5eb Don't emit prologues or epilogues for naked functions (PR18791, PR20028)
68ecda2 PR20844: If we fail to list-initialize a reference, map to the referenced type before retrying the initialization to produce diagnostics. Otherwise, we may fail to produce any diagnostics, and silently produce invalid AST in a -Asserts build. Also add a note to this codepath to make it more clear why we were trying to create a temporary.
3d8ef1f MS format strings: allow the 'h' length modifier with C, C, s and S (PR20808)
341ba57 MS format strings: support the 'w' length modifier (PR20808)
2fbaafb Add triple to ms-inline-asm-return.cpp test
3be1b08 MS inline asm: Allow __asm blocks to set a return value
bb235c6 clang-format: [JS] Support alternative operator names as identifiers.
ac0e79e Win64: Add the uwtable attribute by default on Win64
5ac034c MS inline asm: Add a test for xgetbv clobbers
93dbd61 unique_ptrify JobList::Jobs
ee0eab1 Fix the clang -Werror build after r217152 by flagging a polymorphically used but statically owned hierarchy with a protected base dtor and final classes to satisfy -Wnon-virtual-dtor
c65b1c5 Fix double full-stop that was accidentally added in r217160.
2a8dab4 [mips] Mark aggregates returned in registers with the 'inreg' attribute.
8b3cb5a clang-format: [JS] Supprot "catch" as function name.
c11fbde clang-format: [JS] Support comments in dict literals.
1c3af32 Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.
3957ae8 [mips] Zero-sized structs cannot be ignored in MipsABIInfo::classifyReturnType() for O32
454c208 ARM: Default to apcs-gnu ABI for NetBSD
057305f Add matcher for linkage specification
7a02234 Adjust test to handle fallout from r217102.
c8c7993 [modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes merging of namespace aliases across modules and improves source fidelity. Incidentally also fixes PR20816.
bf6d49b Add ubsan/not_ubsan features to Clang lit tests and use them to exclude tests with large stack usage from UBSan bootstrap.
92e6278 Fix member function call on null pointer in Sema::FindInstantiatedDecl.
4af9566 Enhance the 'Vectors and Extended Vectors' section.
c5de8c6 Update for LLVM api change.
b7423fd Fix indentation. No behavior change.
59c0e21 Split off CUDA-specific Sema parts to a new file
d91dc08 CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
b6d4844 Fix configure and make build of clang-interpreter.
29342ed ASTMatchers: Add a matcher to detect whether a decl or stmt is inside a template instantiation.
bf3d420 Parse: Replace polymorphic functor objects with lambdas and llvm::function_ref.
5890667 clang-format: Add an option 'SpaceAfterCStyleCast'.
8291bea Allow a scoped lockable object to acquire/release multiple locks.
fd2dea5 [modules] Use DeclContext::equals rather than == on DeclContext* when determining whether a declaration is out of line, instead of assuming that the semantic and lexical DeclContext will be the same declaration whenever they're the same entity.
e9783b3 Reinstate "Update for llvm API change.""
5aa7b72 Fix up formatting.
5ba6a1a Avoid test failure on platforms where size_t is long long (and thus can't be directly written in strictly-conforming source code).
0a37d9b Add --analyze to clang-cl
aeb4113 Tests for DR550-572.
6fb7b46 Use /usr/bin/env python instead of /usr/bin/python.
9d62ff5 Don't indent inside a namespace.
9ce674a Don't allow lambdas to capture invalid decls during template instantiations.
f2ced52 Fixing a typo in the documented __builtin_convertvector example.   "vf[0]" ==> "vs[0]"
8634605 Fix for LLVM API change to SpecialCaseList::create
48ec7e0 Test cleanup: move CHECK close to code.
03a41d0 Frontend: Reindent Opts.CoverageFile
f530c8f MS ABI: Reindent MicrosoftCXXABI::GetVirtualBaseClassOffset
ee9528a Typo fix, no functionality change.
3532641 clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 for targeting MSVC x86 for now, due to incompatibility of attribute(thiscall).
8128cd2 cxx_status: we did support some of C++14 in Clang 3.3.
4b79c4d cxx_status: the name C++14 isn't provisional any more.
4ba8e62 Tests for DR525-550.
4bfbecd clang/test/CodeGenCXX/debug-info-access.cpp: Use %itanium_abi_triple to appease msvc. "[def] [free]" can be seen in different order.
4b9bebf Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.
d39a2d4 Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
62c1122 Cleanup test.
3b96126 [modules] Fix deserialization cycle when loading a tag declaration with a typedef name for linkage purposes. When loading the type, delay loading its typedef until we've finished loading and merging the type. In its place, save out the name of the typedef, which we need for merging purposes.
0f8d38e7 Cleanup the test a bit. It was too dependent on the output order.
bfb9ad3 Debug info: Only emit C++ accessibility specifiers when they are diverging from the default for the containing type.
b9e46e3 Add some missing test coverage for merging 'extern "C"' functions with modules.
a038916 Fix my broken test cases.
2b60267 unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter
e648918 unique_ptrify some parameters to PTHManager::PTHManager
b92e1a5 Fixup for r216763. Add a driver test.
8060f16 Make all virtual member pointers use variadic musttail calls
486ef7c Fix for PR20660, where unexpanded parameter pack in function parameter clause causes clang to crash.
78943f9 Add a comment, no functional change.
8a7de8a Objective-C [qoi]. If property is going to be implemented in the super class, do not issue the warning about property in current class's protocol will not be auto synthesized. // rdar://18179833
6626cf2 unique_ptrify the raw_ostream argument to clang::serialized_diags::create
bf9c0da unique_ptrify clang::ento::createCheckerManager
805714a unique_ptrify PathDiagnosticConsumer::HandlePathDiagnostic
44323db Add an option to silence all analyzer warnings.
bacd216 unique_ptrify thep passing of BugReports to BugReportEquivClass
38717be unique_ptrify HeaderMap::FileBuffer
a70a52b unique_ptrify Preprocessor's TokenLexerCache
c2cb99d unique_ptrify the result of CFG::buildCFG/CFGBuilder::buildCFG
6c274d4 unique_ptrify the diagnostics in CXDiagnosticSetImpl
b1585c8 Objective-C. Tweak diagnosing properties that are not auto-synthesized. Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478
f990758 unique_ptrify PathDiagnostic::setEndOfPath's argument
8b29c79 unique_ptr-ify PathDiagnosticPiece ownership
49397c5 Check in a test case for the problem with late-dropped dllimport (PR20803)
05f50c3 One other BuryPointer of a unique_ptr cleanup.
680b6c0 Provide a BuryPointer for unique_ptrs.
93fef8f unique_ptrify Directives in VerifyDiagnosticConsumer
968597c clang-format: Fix unary operator detection in corner case.
10a6347 ASTMatchers: Replace some copies of the bound nodes tree builder with moves.
220fdf4 Use store size instead of alloc size when coercing.
f698366 unique_ptrify SourceManager::createFileID
5630e0f CodeGen: Don't completely mess-up optimized atomic libcalls
f11dfe0 unique_ptrify Driver Action handling
a0a1a1e Improve unique_ptr-y ownership in ASTUnit::ComputePreamble
1e65841 Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
6b75de1 unique_ptrify clang::BackendConsumer::takeModule
a29d00b call __asan_load_cxx_array_cookie when loading array cookie in asan mode.
4d4cf7d Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.
d4a1ae3 Better codegen support for DLL attributes being dropped after the first declaration (PR20792)
efc6cb2 Don't create a null reference in ASTUnit::LoadFromCommandLine.
cdfa631 Don't load invalid enum value in Sema::LazilyCreateBuiltin.
63fa056 Don't load ill-formed AmbiguityKind in Sema::Lookup.
3148d46 Properly align inline space for ImplicitConversionSequences in OverloadSet.
232eaaf Don't create a null reference to NestedNameSpecifier.
52fc295 Call powerpc-darwin external tools with -arch ppc.
1d5d575 Oops, use correct RUN: line for test.
2085b8b [modules] PR20786: add (already passing) regression test from the bug report.
67be089 Reverting r216675. This breaks some bots. Before this can be committed again, I have to explore runtime ABI requirements with libc++abi.
327ee9c Objective-C IRGen. Fixes an assertion crash caused by inconsistent linkage related to generation of OBJC_SELECTOR_REFERENCES symbol needed in generation of call to 'super' in a class method. // rdar://18150301
1c99038 Throw a std::bad_array_new_length exception when the expression (or constant-expression) passed to operator new[] results in overflow in conformance with [expr.new]p7. Fixes PR11644.
d2cac94 Cache the memoization data for DynTypedNodes.
b374ac9 arm_acle: Fix error in ROR implementation
b762185 [CMake] clangStaticAnalyzerFrontend: Add clangLex, corresponding to r216550.
e6e29e4 [ARM] Change default ABI for AArch32 to be "aapcs" (was "apcs-gnu")
0c331cf arm_acle: Implement data processing intrinsics
a380138 Fixed test compatibility with MSVC codegen.
f132337 [modules] When completing the redecl chain for an anonymous declaration in a merged context, pull in the lexical decls in that context, since one of them may complete the redecl chain.
51be7a6 [C++11] Support for capturing of variable length arrays in lambda expression. Differential Revision: http://reviews.llvm.org/D4368
9dfdd2d During cross field uninitialized checking, when processing an assignment, don't mark the field as initialized until the next initializer instead of instantly.  Since this checker is AST based, statements are processed in tree order instead of following code flow.  This can result in different warnings from just reordering the code.  Also changed to use one checker per constructor instead of creating a new checker per field.
6af28e5 [modules] Number anonymous declarations that are lexically within mergeable contexts, so that we can merge them when we merge the surrounding context.
cc33d8f Properly handle multiple nonnull attributes in CodeGen
dd59aef Kill one of EmitCallArgs overloads. NFC.
55d9ed0 [modules] Add an assert that we properly manage the IsCompleteDefinition flag on CXXRecordDecls when merging definitions, and make it pass by not trying to save and restore this flag across AST serialization/deserialization. For CXXRecordDecls, we have a separate mechanism to manage this.
f1967c9 PR20769: Fix confusion when checking whether a prior default argument was in scope when checking for conflicts.
9b25aa4 More -Wuninitialized updates
f0d0b64 Query CompilationDatabase right before running each compilation.
eaf4ee9 Allow adding dll attributes on certain redecls with a warning if the decl hasn't been used yet (PR20746)
926a507 Overload SourceManager::overrideFileContents so that unconditionally passing ownership is explicitly done using unique_ptr.
c8df857 Objective-C. Change to method lookup rules to look into primary class's named categories before looking into their protocols. This is because categories are part of the public interface and , just as primary class, preference should be given to them before class (and category) protocols.  // rdar://18013929
d92e74d Update for LLVM api change.
6340041 Add tests for variadic functions versus attribute nonnull in the static analyzer.
ab16e63 Update for llvm API change.
585339c Fix regression in r216520: don't apply nonnull to non-pointer function parameters in the IR.
7c1ac19 Fix PR20773 which I introduced with a silly edit mistake in r216531. Trivial fix, and I've made the gentoo tests more representative. With the changes, they would have caught this failure.
18480ea clang-format: Address review comments of r216501.
4544002 Call ResolveExceptionSpec for non-OdrUsed functions.
fa0908f Objective-C. When multiple nullary selectors are found in global pool in the course of method selection for a messaging expression, select one with the most general return type of 'id'. This is to remove type-mismatch warning (which is useless) as result of random selection of method with more restrictive return type. rdar://18095772
8fd4641 Allow __fp16 as a function arg or return type for AArch64
3950cc8 Quick fix to test/CodeGen/2007-06-18-SextAttrAggregate.c for x86_64-mingw32, corresponding to r216507.
7a41da6 Use unique_ptr instead of OwningPtr.  I'm not certain how this compiled.
fdf0d35 Add support for the static analyzer to synthesize function implementations from external model files.
702b970 clang-format: Fix regression in formatting of braced initializers.
2269a20 Move some ARM-specific code from CGCall.cpp to TargetInfo.cpp
3e07ebf [asan] Restore asan-rt name on linux back to pre-r216380.
08b8fe7 Significantly fix Clang's header search for Ubuntu (and possibly other modern Debian-based distributions) due to on-going multiarch madness.
bbac840 Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.
6504f57 Fix some cases were ArrayRefs were being passed by reference.
9493495 Refactor one of the larger functions for Type Diffing into smaller functions. No functionality change.
faac93d Driver: Restore -fkeep-inline-functions as an ignored flag
2a1084c Fix representation of __attribute__((nonnull)) to support correctly modeling the no-arguments case. Don't expand this to an __attribute__((nonnull(A, B, C))) attribute, since that does the wrong thing for function templates and varargs functions.
104bc91 Change a few methods to static methods.  No functionality change.
ef86fa4 PR20760: Don't assert (and produce better diagnostics) if a default initializer contains an unmatched closing bracket token.
ab63684 Refactor the diagnostic DeclContext printing.  No functionality change.
0f8328b ClangCodeGenTests: Prune redundant libdeps.
a30cfc7 [CMake] ClangCodeGenTests: Add Core. It's referenced by the test.
2a3b818 ClangCodeGenTests: Reorder libdeps.
14eec94 ClangCodeGenTests: Quick fix to USEDLIBS. clangCodeGen requires, at least, AST, Basic, Frontend, and Lex.
404d524 Re-apply r216491 (Win64 ABI shouldn't extend integer type arguments.)
2b3310f Fix missing component.
e1b1adc [modules] Don't assert when merging virtual functions that override other functions. Also don't needlessly pull in non-canonical declarations of the overridden virtual functions.
3c002de clang-format: Don't butcher __asm blocks.
f839645 Attempt to address cmake buildbot failure
7db5421 Revert 216491, it breaks CodeGenCXX/microsoft-abi-member-pointers.cpp
6cc1c22 Don't segfault in EmitCXXGlobalInitFunc when main file is a membuf
1b4975f Update for llvm api change.
3d0984b2 Win64 ABI shouldn't extend integer type arguments.
a3d81725 Clarify comment so this doesn't appear to be a C11-only rule.
cfa7a9e Update for llvm api change
63823de revert patch r216469.
bf2ef3e [libclang] Fixup the cursor spelling range for C++ destructors, operator overloads, and conversion functions.
73945fa Fix an incorrect assert condition added in r216410.
50f7732 Return a std::unique_ptr from getBufferForFile. NFC.
2ace02a Ignore -fdevirtualize and -fdevirtualize-speculatively for gcc compat
490fd36 Return a std::unique_ptr from getBufferForFile. NFC.
8188b32 [test/CodeGen/ARM] Update arm_neon_intrinsics test case to actually test the lowering of the intrinsics. Prior to this commit, most of the copy-related intrinsics could be optimized away. The situation is still not ideal as there are several possibilities to lower a given intrinsic. Currently, we match LLVM behavior.
bffbc2a Convert MC command line flag for fatal assembler warnings into a proper flag.
1bd3f74 c11- Check for c11 language option as documentation says feature is c11 about nested struct declarations must have struct-declarator-list. Without this change, code which was meant for c99 breaks. rdar://18125536
3755e27 Update for llvm api change.
f24ba61 Switching from std::vector to llvm::ArrayRef per post-commit review suggestion.
26380cd Some versions of MSVC do not support initializer list construction of vectors, so this fixes a broken build from r216385.
8839624 This test was updated in r216397, but was failing on Windows due to mixed path separators as well as case sensitivity of the "no" in "no such file or directory." Rather than revert this file back to its original form, I've made some incredibly ugly regexes so that it will pass everywhere.
e2b32bc arm_acle: Add mappings for dbg intrinsic
982f0de ARM: Add dbg builtin intrinsic
4b30eb6 clang-format: New option SpacesInSquareBrackets.
94705ef [ASan/Win] Add an extra thunk.lib to handle stack-use-after-return option
ae401c8 arm_acle: Implement swap intrinsic
655e70b clang-format: Improve handling of block comments in braced lists.
f53535a Passing a variable to std::move now counts as a use for -Wuninitialized
d12f6af [modules] Track the described template in an alias declaration that is the pattern of an alias template declaration. Use this to merge alias templates properly when they're members of class template specializations.
ef90791 [clang/asan] call __asan_poison_cxx_array_cookie after operator new[]
eac3c8c Fix typo.
324487e Pass actual CXXConstructExpr instead of argument iterators into EmitSynthesizedCXXCopyCtorCall. No functionality change.
effffaa Objective-C. Allow [super initialize] in an +initialize implementation but not anywhere else. rdar://16628028
884375b Objective-C modernization. Convert -initWithUTF8String messaging with auto-boxing syntax for literals. rdar://18080352
8eae4ca Pass actual CallExpr instead of CallExpr-specific iterators into EmitCXXMemberOrOperatorCall methods. In the end we want to make declaration visible in EmitCallArgs() method, that would allow us to alter CodeGen depending on function/parameter attributes.
97b51af Update for llvm api change.
79adaa2 ASTVector: Fix return value of various insert() methods.

git-subtree-dir: llvm/tools/clang
git-subtree-split: 663b4dd44efe005ebd0d07ffbd509e56c4f4d5cc
Merge with Clang.
Squashed 'llvm/tools/lldb/' changes from f94ccdc..9f07825

9f07825 Properly decode architecture type in GDBRemoteCommunicationClient::GetCurrentProcessInfo.
f89b284 Check for byte order correctness in GDBRemoteCommunicationClient::GetCurrentProcessInfo.
12ef0dd Fix build break in Xcode build of lldb-tool.
a2630b2 Correct typo in tutorial page
afaf4b6 Nope, I was right originally.  ResolveUsername should resolve "~" to the current user, and ResolvePartialUsername will resolve "~" to the list of users.
d89b9bf Don't make paths with /Foo//bar, that confuses everybody down the line. This gets the file completer for absolute paths working again.
10dec69 Fix incorrect initializer list style.
b839872 Revert 217719, that wasn't the right fix, that should complete user names, and anyway /Vol doesn't complete correctly either.  Somehow we're chopping the names up incorrectly before passing them into the completer.
dbc0414 ResolveUsername should resolve "~" to the user's home directory as well as "~/".  This gets command-line file completion from ~ working again.
ae2023e std::function is a better choice than a raw function pointer here. You probably still want to be careful about cleaning up stuff you captured, but it's not like a function pointer wasn't going to let you shoot yourself in the foot given enough dedication.
455a1a2 llgs: fix thread names broken by recent native thread changes.
d6dbaaf Make ProcessLaunchInfo copyable.
c9c3576 Add logic to LLDB to figure out the types of member functions of C++ classes. Add plumbing for that all the way up to the SB layer
9afb905 lldb fix ARM64 register access
399a8ee Fix lldb-mi driver for running on OSX.
f6ecb64 Fix OSX CMake build
81c872b Fix the ctor ivar initialization formatting for Debugger, TypeValidatorImpl, FileAction, and ProcessLaunchInfo to match the lldb coding convention.
24f8649 Recent builds of libcxx actually wrap an std::map's children values in a union containing either a member named __cc, or either of __cc and __nc (const vs. non-const). This level of wrapping is quite useless for LLDB to show to people, so try to detect it, and filter it out
2de2ffc Change SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes to use the ProcessStructReader instead of reading the structure out of libdispatch by hand.  I will convert more of the struct readers in SystemRuntimeMacOSX over to use this class eventually.
1ce9072 llgs: fix Ctrl-C inferior interrupt handling to do the right thing.
afacc0f Add a ProcessStructReader utility class to LLDB
1be22415 When deciding if one-liner printing applies, and you find a summary, the summary is a good candidate to ask. While in theory one could want one-liner printing with a non-one-liner summary, I don't see LLDB as the best place to solve such inner conflicts
4ee72f7 Add missing constructor definition.
8c5d0f3 Update HostProcess to use the same facade pattern as HostThread.
23794e2 Fix Windows build.
06fea93 gdb-remote tests: added test to verify thread stop info when multi-threaded app is interrupted.
6c299d1 DWARF64 Fixes
22e069c Rework how resetting breakpoints in changed modules works.  Try to match up old locations with new ones if possible.
690087c llgs: implement qThreadStopInfo.
ac1ed63 Move FreeBSD's thread SetName implementation to ThisThread
f22044d Fix FreeBSD build after thread changes
83ecd71 Include the correct headers for kinfo_proc on FreeBSD.
1075380 Try to fix the FreeBSD build.
caa59bd Create a HostThread abstraction.
a74e2d1 Add a comment explaining why we're casting the local variable.
05e795e Quiet unused variable warning that only occurs when compiling optimized.
3764c6d Remove the -Wno-unused-function option. We are clean with -Wunused-function as far as I can tell.
ae37b38 Fix comment and remove duplicated -Wno-sign-compare option.
104fcee Remove unused class variable and its initialization.
ed89f0e Remove a pair of default values from fully covered switches.
e27b3b4 Add a newline to the end of the file.
f831b0b Compare against the right size integer.
848f2e4 Remove two default cases out of fully covered switches.
fb900e8 Remove two unused class variables.
7905867 Remove unused class variable and update all callers/users.
957ea58 Fix -Werror,-Wcovered-switch-default warning in DWARFExpression as part of an attempt to get lldb building inside llvm with -Werror enabled.
34cbe07 Add back a return that got lost in rebase
63c2039 Fix configure & make build with python disabled
1eae4cb DataFormatters: add missing destructor implementation
4a1dea6 Fix test failure for test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use
f28fbc9 Modify call-function and rdar-12437442 tests to clean up all files produced during test run.
86c998c Linux/FreeBSD local debugging: allow redirection to pts for POSIX process.
56888f9 remove a couple of default cases from switches
8615585 DataFormatters: add missing function implementations
1a94a0d build: attempt to fix the buildbots
93c4a24 driver: handle write error better
e1b67cd DataFormatters: use include instead of import in C++
e54bb24 Correct copied error message
1e36690 Add a -V <bool> flag to frame variable/expression that enables execution of type validators. The jury is still out on what the user experience of type validators should be, so for now gate it on a specific flag. The mode I am using is prefix variables that fail to validate with a bang, and then emitting the actual validation error on a separate line. Of course, given the total absence of validators, this should never actually happen to you
e8fc9f3 The original jit no longer exists in llvm, remove from dependencies.
56159ed Implement ASan history threads in SB API
6f4ed60 Expose the ability to retrieve the result of a type validator via the SB API. To keep it simple, do not expose the pair, but just return a NULL string for success, and a non-NULL string for error; If we were to decide to expose the pair, we would need an SBTypeValidatorResult, which is fine, but it should come as part of exposing type validators through the SB API rather than as a one-off thing. So, KISS for now
d8c65b5 Fix CMake configuration (forgot to add a file in the last commit).
3de95cb Expose ThreadCollection in SB API
cee5eac Added logging of the POSIX-DYLD rendezvous address (i.e. the info_location address)
2a46fe4 Add more logging to DynamicLoaderPOSIXDYLD, especially around rendezvous handling.
18f240b Start plumbing the type validator logic through to the ValueObjects; allow a ValueObject to have a validator, to update it from the FormatManager, and to retrieve (and cache) the result of the validation
4a87711 Add TypeValidator.cpp to cmake build.
0562760 Introduce the notion of a "type validator" formatter
36c8106 Fix CMake configuration
3f7cd63 [lldb] Abstract a superclass for a generic thread container.
5670ac0 Properly handle the DYLD attach step for GDB remotes.
4350149 Set the process vendor in GDBRemoteCommunicationClient::GetCurrentProcessInfo.
9055020 Add error report when Module::GetObjectFile() fails to find a plugin to open an object file.
a45429b Fix up lldb build for llvm r217172.
c2bec21 Fix build break on Ubuntu 12.04 with ARM64 changes.
68b0c5a Use the process' ReadCStringFromMemory from DYLDRendezvous::ReadStringFromMemory.
bbfc8d3 ASan malloc/free history threads
a23eb88 rdar://problem/18221417 Include compressed memory as part of gauge memory.
21917b9 Add a new target.process.memory-cache-line-size to change the size of lldb's internal memory cache chunks that are read from the remote system.  For a remote connection that is especially slow, a user may need to reduce it; reading a 512 byte chunk of memory whenever a 4-byte region is requested may not be the right decision in these kinds of environments. <rdar://problem/18175117>
03c95dc Really fix the LLDB build
4523d35 Remove the JIT from LLDB's dependencies to fix the build
79fce18 RegisterContextLLDB::InitializeNonZerothFrame had a bit of code to detct unwind loops but there was a code path through there (using architecture default unwind plans) that didn't do the check, and could end up with an infinite loop unwind.  Move that code into a separate method and call it from both places where it is needed.
50f7fe4 Fix MacOSX cmake build for new HostInfoMacOSX file.
6bc1583 Linux ARM64: add ProcessMonitor-related RegisterContext support.
32c6636 Add an interface on ArchSpec to provide lldb client code with a mechanism to query if the current target architecture has non 8-bit bytes.
f534f50 Fixed a build problem dueo to changes in the way ownership of memory buffers is handled in clang's SourceManager.
0e9f24e Fix a test broken by r216564.
e29b65d lldb - fix misleading "valid target indexes are" error message
7397b34 Consolidate UnixSignals setting/getting in Process.
54499c0 Allow "breakpoint command add" to add commands to more than one breakpoint at a time.
e2a117e Add arbitrary command line flags to llgs/debugserver startup for local debugging.
238f336 lldb - ELF: add ARM64 relocation jump slot handling in ELFHeader.
4ce650d lldb - Register Context Linux ARM64
1d4689a Added setting: platform.plugin.linux.use-llgs-for-local (boolean), defaults to false
eb50580 Ensure the Host wait4 thread is able to show pid in thread name.
1373664 llgs: add proper exec support for Linux.
3252c1b lldb - towards AArch64 being recognised as platform architecture
8124c18 Make it clear in the help that "breakpoint command add" will act on the last set breakpoint if no breakpoint id is specified.
9a26d63 Add some logging around Process attaching and inferior exec handling.
bab1bd5 A quoted - is not the beginning of an option, and should not be completed as such.  This was causing:
6ff6462 Make it clear that the load_addr property on SBAddress relies on lldb.target, and so can only be used in the script interpreter.
fa84cdf Fix linker error due to missing static variable instantiation.
1e88a3f Create a HostProcess class.
e9e579d Update LLDB to use LLVM's DynamicLibrary.
ee9cd34 Update for LLVM API change.
6e566fe llgs: remove all Initialize() calls except for Debugger::Initialize().
4ac15dc NativeThreadLinux: remove translation of some Linux signals to gdb signals.
f9f3906 lldb Missing ARM64 breakpoint opcode for ProcessPOSIX added.
d7ac024 lldb AArch64 should be listed as yet another 64-bit architecture in HostInfoBase.
f61cb8c lldb Missing break statement added.
f79ce8b Add Linux support for get thread area on ARM64 using ProcessMonitor debugging.
d6e6a2c Add support for kalimba architecture variants 3, 4 and 5. Add entries to core_definitions and elf_arch_entries for those variants. Select the subtype for the variant by parsing the e_flags field of the elf header.
125f2b7 Add __NSCFDictionary to the list of NSDictionary-like types for which we know to generate synthetic children
97033f0 Clean up after the multithreaded test case finishes.
ad739df There seems to be no sane reason for a test case to enable logging every time it runs.. probably leftover from when I was debugging it
d3cca6f Don't have ProcessMachCore::CanDebug use the Target's arch when creating the ModuleSpec to load the core file - we won't have a fat core file and we can end up with cpu subtype mismatches if the core file header isn't written out completely accurately.  We need to be a little loose in this particular case. <rdar://problem/17843388>
515f354 It was pointed out to me that an offset of 0 makes sense for ObjC, but not always for C++, and this API claims to be general enough that it should not drop C++ usability on the floor for no good reason. Fix it with an explicit offset argument
a6238e5 [dwarf] Add new language enumerations.
e2a9139 Add an API on ValueObject to generate a 'synthetic child' of base class type. Note that in this commit, the term synthetic child is not meant to refer to data formatters, but to the programmatically-generated children stored inside a ValueObject itself
0a2725a Added a couple more gdb-remote tests to ensure qProcessInfo on darwin is not defining triple.
c511706 Fix llgs to send triple for non-Apple platforms and lldb to interpret correctly.
687a768 Refactored existing gdb-remote qProcessInfo tests into separate python file.
3dfda05 Remove the hostname part from compilation directories, if supplied by DWARF2/3 compliant producers.
369d8ac Remove trailing whitespace from lines in UnwindAssembly-x86.cpp.  No other changes.
a1472a0 Clean up the coding conventions in UnwindAssembly-x86.cpp a little bit. I wrote this originally as a part of an unwind library that was using a different coding convention and some of that old style remained after its integration into lldb.
cbda96e Copy unwind plan instead of modifying it directly, so "image show-unwind" prints different plans for asynchronous and synchronous.
9056fef Have augment_unwind_plan_from_call_site update the UnwindPlan name/from-compiler settings to indicate that it was augmented by assembly profiling.
fb448a4 Add 64-bit eh_frame section CFI support.
cb6562c On x86 & x86_64, try to use eh_frame for frame 0.
360adc2 Added a test case to ensure lldb::SBHostOS::GetLLDBPath() doesn't return lldb::SBFileSpec objects with the filename filled in for directory paths.
2aba522 Change back all paths returns for lldb::PathType enumerations from HostInfo::GetLLDBPath() to return the directories in the FileSpec.m_directory field to match previous implementations. This change previously broke some path stuff in upstream branches.
eca4b04 Fix the Windows build by removing the unused lldb_python_module.cmake inclusion from CMakeLists.

git-subtree-dir: llvm/tools/lldb
git-subtree-split: 9f07825a09f88ec874c92c4ea92153dca1b02df5
Merge with LLDB.
Merge scc command with Clang.
Finish merge with LLVM/Clang/LLDB.