FailedChanges

Summary

  1. [sanitizers][windows] Rtl-Heap Interception and tests - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927
  2. [LoopPred] Extend LFTR normalization to the inverse EQ case A while back, I added support for NE latches formed by LFTR. I didn't think that quite through, as LFTR will also produce the inverse EQ form for some loops and I hadn't handled that. This change just adds handling for that case as well.
  3. [WebAssembly] Fix a typo in a test file name Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64324
  4. Changing CodeView debug info type record representation in assembly files to make it more human-readable & editable & fixing bug introduced in r364987
  5. [TSan] Fix linker error for Linux/AArch64
  6. Use `ln -n` to prevent forming a symlink cycle, instead of rm'ing the source This is a better fix for the problem fixed in r334972. Also remove the rm'ing of the symlink destination that was there to clean up the bots -- it's over a year later, bots should be happy now. Differential Revision: https://reviews.llvm.org/D64301
  7. Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics With this, `clang-cl /source-charset:utf-16 test.cc` now prints `invalid value 'utf-16' in '/source-charset:utf-16'` instead of `invalid value 'utf-16' in '-finput-charset=utf-16'` before, and several other clang-cl flags produce much less confusing output as well. Fixes PR29106. Since an arg and its alias can have different arg types (joined vs not) and different values (because of AliasArgs<>), I chose to give the Alias its own Arg object. For convenience, I just store the alias directly in the unaliased arg – there aren't many arg objects at runtime, so that seems ok. Finally, I changed Arg::getAsString() to use the alias's representation if it's present – that function was already documented as being the suitable function for diagnostics, and most callers already used it for diagnostics. Implementation-wise, Arg::accept() previously used to parse things as the unaliased option. The core of that switch is now extracted into a new function acceptInternal() which parses as the _aliased_ option, and the previously-intermingled unaliasing is now done as an explicit step afterwards. (This also changes one place in lld that didn't use getAsString() for diagnostics, so that that one place now also prints the flag as the user wrote it, not as it looks after it went through unaliasing.) Differential Revision: https://reviews.llvm.org/D64253
  8. [X86][PPC] Support -mlong-double-64 -mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}). On many other targets, there will be an error: error: unrecognized command line option '-mlong-double-64' This patch makes the driver option -mlong-double-64 available for x86 and ppc. The CC1 option -mlong-double-64 is available on all targets for users to test on unsupported targets. LongDoubleSize is added as a VALUE_LANGOPT so that the option can be shared with -mlong-double-128 when we support it in clang. Also, make powerpc*-linux-musl default to use 64-bit long double. It is currently the only supported ABI on musl and is also how people configure powerpc*-linux-musl-gcc. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D64067
  9. clang-cl: Port cl.exe's C4659 to clang-cl Differential Revision: https://reviews.llvm.org/D64349
  10. [analyzer] exploded-graph-rewriter: Implement a topology-only mode. In this mode the rewriter will only rewrite program points and omit program states. Useful for understanding the rough topology of the graph. Differential Revision: https://reviews.llvm.org/D64264
  11. [analyzer] exploded-graph-rewriter: Implement a single-path mode. Instead of rewriting the whole graph, rewrite the leftmost path in the graph. Useful for trimmed graphs that are still too large to display due to multiple equivalent reports mixed into them. Differential Revision: https://reviews.llvm.org/D64263
  12. [ObjC] Add a -Wtautological-compare warning for BOOL On macOS, BOOL is a typedef for signed char, but it should never hold a value that isn't 1 or 0. Any code that expects a different value in their BOOL should be fixed. rdar://51954400 Differential revision: https://reviews.llvm.org/D63856
  13. [Attributor] Deduce the "returned" argument attribute Deduce the "returned" argument attribute by collecting all potentially returned values. Not only the unique return value, if any, can be used by subsequent attributes but also the set of all potentially returned values as well as the mapping from returned values to return instructions that they originate from (see AAReturnedValues::checkForallReturnedValues). Change in statistics (-stats) for LLVM-TS + Spec2006, totaling ~19% more "returned" arguments. ADDED: attributor NumAttributesManifested n/a -> 637 ADDED: attributor NumAttributesValidFixpoint n/a -> 25545 ADDED: attributor NumFnArgumentReturned n/a -> 637 ADDED: attributor NumFnKnownReturns n/a -> 25545 ADDED: attributor NumFnUniqueReturned n/a -> 14118 CHANGED: deadargelim NumRetValsEliminated 470 -> 449 ( -4.468%) REMOVED: functionattrs NumReturned 535 -> n/a CHANGED: indvars NumElimIdentity 138 -> 164 ( +18.841%) Reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames, efriedma, chandlerc Subscribers: hiraditya, bollu, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59919
  14. [cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable. This is a fix for rG864949 which only disabled default construction and assignment for lambdas with capture-defaults, where the C++2a draft disables them for lambdas with any lambda-capture at all. Patch by Logan Smith! Differential Revision: https://reviews.llvm.org/D64058
  15. [Frontend] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h This fixes a modules issue: error: declaration of 'bitc' must be imported from module 'Clang_Serialization.ASTBitCodes' before it is required Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record);
  16. [AArch64][GlobalISel] Use TST for comparisons when possible Porting over the part of `emitComparison` in AArch64ISelLowering where we use TST to represent a compare. - Rename `tryOptCMN` to `tryFoldIntegerCompare`, since it now also emits TSTs when possible. - Add a utility function for emitting a TST with register operands. - Rename opt-fold-cmn.mir to opt-fold-compare.mir, since it now also tests the TST fold as well. Differential Revision: https://reviews.llvm.org/D64371
  17. Fix line endings. NFC
  18. [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win from r365386.
  19. [Sanitizers] Remove clang_rt.sancov_{begin,end} on Solaris There's no point to manually create the __start___sancov_guards and __stop___sancov_guards sections and labels on Solaris any longer. They were originally introduced in https://reviews.llvm.org/D40899 and https://reviews.llvm.org/D40903. - The Solaris 11.4 ld supports creating them out of the box. - We already unconditionally use Solaris 11.4 features like the ld -z gnu-version-script-compat option and fully working .preinit_array support in compiler-rt. - The current files don't assemble on SPARC because the assembler syntax may be different between /bin/as and GNU as. Tested on amd64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63601
  20. AMDGPU: Split extload/zextload local load patterns This will help removing the custom load predicates, allowing the global isel emitter to handle them.
  21. [Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end} on Solaris any longer. This companion patch to the above removes their use from the driver. Tested on amd64-pc-solaris2.11 Differential Revision: https://reviews.llvm.org/D63602
  22. Add parentheses to silence warnings.
  23. Add parentheses to silence warning.
  24. Revert [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings This reverts r365382 (git commit 8b1becf2e31d9170ee356a19c7b6ea991d3a520f) Appears to regress this semi-reduced fragment of valid code from windows SDK headers: #define InterlockedIncrement64 _InterlockedIncrement64 extern "C" __int64 InterlockedIncrement64(__int64 volatile *Addend); #pragma intrinsic(_InterlockedIncrement64) unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) { return (unsigned __int64)(InterlockedIncrement64)((volatile __int64 *)Addend); } Found on a buildbot here, but no mail was sent due to it already being red: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48067
  25. Standardize on MSVC behavior for triples with no environment Summary: This makes it so that IR files using triples without an environment work out of the box, without normalizing them. Typically, the MSVC behavior is more desirable. For example, it tends to enable things like constant merging, use of associative comdats, etc. Addresses PR42491 Reviewers: compnerd Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64109
  26. llvm-profdata] Handle the cases of overlapping input file and output file Currently llvm-profdata does not expect the same file name for the input profile and the output profile. >llvm-profdata merge A.profraw B.profraw -o B.profraw The above command runs successfully but the resulted B.profraw is not correct. This patch fixes the issue by moving the initialization of writer after loading the profile. For the show command, the following will report a confusing error of "Empty raw profile file": >llvm-profdata show B.profraw -o B.profraw It's harder to fix as we need to output something before loading the input profile. I don't think that a fix for this is worth the effort. I just make the error explicit for the show command. Differential Revision: https://reviews.llvm.org/D64360
Revision 365422 by mcgov:
[sanitizers][windows] Rtl-Heap Interception and tests
   - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap
   - Adds unit tests for the new interceptors and expands HeapAlloc
     tests to demonstrate new functionality.
   Reviewed as D62927
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/asan/asan_flags.inccompiler-rt.src/lib/asan/asan_flags.inc
The file was modified/compiler-rt/trunk/lib/asan/asan_malloc_win.cccompiler-rt.src/lib/asan/asan_malloc_win.cc
The file was modified/compiler-rt/trunk/lib/asan/asan_win.cccompiler-rt.src/lib/asan/asan_win.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cccompiler-rt.src/test/asan/TestCases/Windows/dll_host.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cccompiler-rt.src/test/asan/TestCases/Windows/dll_unload.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_doublefree.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_huge.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_sanity.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_transfer.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_uaf.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cccompiler-rt.src/test/asan/TestCases/Windows/heapalloc_zero_size.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cccompiler-rt.src/test/asan/TestCases/Windows/heaprealloc.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cccompiler-rt.src/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cccompiler-rt.src/test/asan/TestCases/Windows/heaprealloc_zero_size.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cccompiler-rt.src/test/asan/TestCases/Windows/queue_user_work_item_report.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cccompiler-rt.src/test/asan/TestCases/Windows/rtlallocateheap.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cccompiler-rt.src/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cccompiler-rt.src/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cccompiler-rt.src/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cccompiler-rt.src/test/asan/TestCases/Windows/rtlallocateheap_zero.cc
Revision 365419 by reames:
[LoopPred] Extend LFTR normalization to the inverse EQ case

A while back, I added support for NE latches formed by LFTR.  I didn't think that quite through, as LFTR will also produce the inverse EQ form for some loops and I hadn't handled that.  This change just adds handling for that case as well.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopPredication.cppllvm.src/lib/Transforms/Scalar/LoopPredication.cpp
The file was modified/llvm/trunk/test/Transforms/LoopPredication/basic.llllvm.src/test/Transforms/LoopPredication/basic.ll
Revision 365418 by aheejin:
[WebAssembly] Fix a typo in a test file name

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64324
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/CodeGen/WebAssembly/add-prototypes-conflict.llllvm.src/test/CodeGen/WebAssembly/add-prototypes-conflict.ll
The file was removed/llvm/trunk/test/CodeGen/WebAssembly/add-prototypes-conflit.llllvm.src/test/CodeGen/WebAssembly/add-prototypes-conflit.ll
Revision 365417 by nilanjana_basu:
Changing CodeView debug info type record representation in assembly files to make it more human-readable & editable & fixing bug introduced in r364987
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.hllvm.src/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.hllvm.src/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecordMapping.hllvm.src/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.hllvm.src/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cppllvm.src/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
The file was modified/llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cppllvm.src/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
The file was modified/llvm/trunk/lib/DebugInfo/CodeView/CodeViewRecordIO.cppllvm.src/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
The file was modified/llvm/trunk/lib/DebugInfo/CodeView/TypeRecordMapping.cppllvm.src/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
The file was modified/llvm/trunk/test/DebugInfo/COFF/anonymous-struct.llllvm.src/test/DebugInfo/COFF/anonymous-struct.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/big-type.llllvm.src/test/DebugInfo/COFF/big-type.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/class-options-common.llllvm.src/test/DebugInfo/COFF/class-options-common.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/const-unnamed-member.llllvm.src/test/DebugInfo/COFF/const-unnamed-member.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/defer-complete-type.llllvm.src/test/DebugInfo/COFF/defer-complete-type.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/enum-co.llllvm.src/test/DebugInfo/COFF/enum-co.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/enum.llllvm.src/test/DebugInfo/COFF/enum.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/function-options.llllvm.src/test/DebugInfo/COFF/function-options.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/globals.llllvm.src/test/DebugInfo/COFF/globals.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/inheritance.llllvm.src/test/DebugInfo/COFF/inheritance.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/inlining-padding.llllvm.src/test/DebugInfo/COFF/inlining-padding.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/inlining-same-name.llllvm.src/test/DebugInfo/COFF/inlining-same-name.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/inlining.llllvm.src/test/DebugInfo/COFF/inlining.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/lambda.llllvm.src/test/DebugInfo/COFF/lambda.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/long-type-name.llllvm.src/test/DebugInfo/COFF/long-type-name.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/nested-types.llllvm.src/test/DebugInfo/COFF/nested-types.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/retained-types.llllvm.src/test/DebugInfo/COFF/retained-types.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/scopes.llllvm.src/test/DebugInfo/COFF/scopes.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/static-methods.llllvm.src/test/DebugInfo/COFF/static-methods.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/type-quals.llllvm.src/test/DebugInfo/COFF/type-quals.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-array-advanced.llllvm.src/test/DebugInfo/COFF/types-array-advanced.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-array-unsized.llllvm.src/test/DebugInfo/COFF/types-array-unsized.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-array.llllvm.src/test/DebugInfo/COFF/types-array.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-basic.llllvm.src/test/DebugInfo/COFF/types-basic.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-calling-conv.llllvm.src/test/DebugInfo/COFF/types-calling-conv.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-cvarargs.llllvm.src/test/DebugInfo/COFF/types-cvarargs.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-data-members.llllvm.src/test/DebugInfo/COFF/types-data-members.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-empty-member-fn.llllvm.src/test/DebugInfo/COFF/types-empty-member-fn.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-method-ref-qualifiers.llllvm.src/test/DebugInfo/COFF/types-method-ref-qualifiers.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-nested-class.llllvm.src/test/DebugInfo/COFF/types-nested-class.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-non-virtual-methods.llllvm.src/test/DebugInfo/COFF/types-non-virtual-methods.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-ptr-to-member.llllvm.src/test/DebugInfo/COFF/types-ptr-to-member.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/types-recursive-struct.llllvm.src/test/DebugInfo/COFF/types-recursive-struct.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/unnamed.llllvm.src/test/DebugInfo/COFF/unnamed.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/vftables.llllvm.src/test/DebugInfo/COFF/vftables.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/virtual-method-kinds.llllvm.src/test/DebugInfo/COFF/virtual-method-kinds.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/virtual-methods.llllvm.src/test/DebugInfo/COFF/virtual-methods.ll
The file was modified/llvm/trunk/test/DebugInfo/COFF/vtable-optzn-array.llllvm.src/test/DebugInfo/COFF/vtable-optzn-array.ll
Revision 365415 by yln:
[TSan] Fix linker error for Linux/AArch64
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cccompiler-rt.src/lib/tsan/rtl/tsan_platform_linux.cc
Revision 365414 by nico:
Use `ln -n` to prevent forming a symlink cycle, instead of rm'ing the source

This is a better fix for the problem fixed in r334972.

Also remove the rm'ing of the symlink destination that was there to
clean up the bots -- it's over a year later, bots should be happy now.

Differential Revision: https://reviews.llvm.org/D64301
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/no-canonical-prefixes.cclang.src/test/Driver/no-canonical-prefixes.c
Revision 365413 by nico:
Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics

With this, `clang-cl /source-charset:utf-16 test.cc` now prints `invalid
value 'utf-16' in '/source-charset:utf-16'` instead of `invalid value
'utf-16' in '-finput-charset=utf-16'` before, and several other clang-cl
flags produce much less confusing output as well.

Fixes PR29106.

Since an arg and its alias can have different arg types (joined vs not)
and different values (because of AliasArgs<>), I chose to give the Alias
its own Arg object. For convenience, I just store the alias directly in
the unaliased arg – there aren't many arg objects at runtime, so that
seems ok.

Finally, I changed Arg::getAsString() to use the alias's representation
if it's present – that function was already documented as being the
suitable function for diagnostics, and most callers already used it for
diagnostics.

Implementation-wise, Arg::accept() previously used to parse things as
the unaliased option. The core of that switch is now extracted into a
new function acceptInternal() which parses as the _aliased_ option, and
the previously-intermingled unaliasing is now done as an explicit step
afterwards.

(This also changes one place in lld that didn't use getAsString() for
diagnostics, so that that one place now also prints the flag as the user
wrote it, not as it looks after it went through unaliasing.)

Differential Revision: https://reviews.llvm.org/D64253
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/arm-execute-only.cclang.src/test/Driver/arm-execute-only.c
The file was modified/cfe/trunk/test/Driver/cl-options.cclang.src/test/Driver/cl-options.c
The file was modified/cfe/trunk/test/Driver/darwin-version.cclang.src/test/Driver/darwin-version.c
The file was modified/lld/trunk/Common/Reproduce.cppN/A
The file was modified/lld/trunk/ELF/Driver.cppN/A
The file was modified/lld/trunk/test/ELF/sectionstart.sN/A
The file was modified/llvm/trunk/include/llvm/Option/Arg.hllvm.src/include/llvm/Option/Arg.h
The file was modified/llvm/trunk/include/llvm/Option/Option.hllvm.src/include/llvm/Option/Option.h
The file was modified/llvm/trunk/lib/Option/Arg.cppllvm.src/lib/Option/Arg.cpp
The file was modified/llvm/trunk/lib/Option/Option.cppllvm.src/lib/Option/Option.cpp
Revision 365412 by maskray:
[X86][PPC] Support -mlong-double-64

-mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}).
On many other targets, there will be an error:

    error: unrecognized command line option '-mlong-double-64'

This patch makes the driver option -mlong-double-64 available for x86
and ppc. The CC1 option -mlong-double-64 is available on all targets for
users to test on unsupported targets.

LongDoubleSize is added as a VALUE_LANGOPT so that the option can be
shared with -mlong-double-128 when we support it in clang.

Also, make powerpc*-linux-musl default to use 64-bit long double. It is
currently the only supported ABI on musl and is also how people
configure powerpc*-linux-musl-gcc.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D64067
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/LangOptions.defclang.src/include/clang/Basic/LangOptions.def
The file was modified/cfe/trunk/include/clang/Driver/Options.tdclang.src/include/clang/Driver/Options.td
The file was modified/cfe/trunk/lib/Basic/TargetInfo.cppclang.src/lib/Basic/TargetInfo.cpp
The file was modified/cfe/trunk/lib/Basic/Targets/PPC.hclang.src/lib/Basic/Targets/PPC.h
The file was modified/cfe/trunk/lib/Driver/ToolChains/Clang.cppclang.src/lib/Driver/ToolChains/Clang.cpp
The file was modified/cfe/trunk/lib/Frontend/CompilerInvocation.cppclang.src/lib/Frontend/CompilerInvocation.cpp
The file was removed/cfe/trunk/test/CodeGen/long-double-x86.cclang.src/test/CodeGen/long-double-x86.c
The file was removed/cfe/trunk/test/CodeGen/ppc64-align-long-double.cclang.src/test/CodeGen/ppc64-align-long-double.c
The file was added/cfe/trunk/test/CodeGen/ppc64-long-double.cppclang.src/test/CodeGen/ppc64-long-double.cpp
The file was added/cfe/trunk/test/CodeGen/x86-long-double.cppclang.src/test/CodeGen/x86-long-double.cpp
The file was added/cfe/trunk/test/Driver/mlong-double-64.cclang.src/test/Driver/mlong-double-64.c
Revision 365411 by nico:
clang-cl: Port cl.exe's C4659 to clang-cl

Differential Revision: https://reviews.llvm.org/D64349
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/Attr.tdclang.src/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticGroups.tdclang.src/include/clang/Basic/DiagnosticGroups.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.tdclang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaAttr.cppclang.src/lib/Sema/SemaAttr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaDeclAttr.cppclang.src/lib/Sema/SemaDeclAttr.cpp
The file was modified/cfe/trunk/test/Sema/pragma-section.cclang.src/test/Sema/pragma-section.c
Revision 365410 by dergachev:
[analyzer] exploded-graph-rewriter: Implement a topology-only mode.

In this mode the rewriter will only rewrite program points
and omit program states. Useful for understanding
the rough topology of the graph.

Differential Revision: https://reviews.llvm.org/D64264
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/test/Analysis/exploded-graph-rewriter/topology.dotclang.src/test/Analysis/exploded-graph-rewriter/topology.dot
The file was modified/cfe/trunk/utils/analyzer/exploded-graph-rewriter.pyclang.src/utils/analyzer/exploded-graph-rewriter.py
Revision 365409 by dergachev:
[analyzer] exploded-graph-rewriter: Implement a single-path mode.

Instead of rewriting the whole graph, rewrite the leftmost path in the
graph. Useful for trimmed graphs that are still too large to display due
to multiple equivalent reports mixed into them.

Differential Revision: https://reviews.llvm.org/D64263
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/test/Analysis/exploded-graph-rewriter/explorers.dotclang.src/test/Analysis/exploded-graph-rewriter/explorers.dot
The file was modified/cfe/trunk/utils/analyzer/exploded-graph-rewriter.pyclang.src/utils/analyzer/exploded-graph-rewriter.py
Revision 365408 by epilk:
[ObjC] Add a -Wtautological-compare warning for BOOL

On macOS, BOOL is a typedef for signed char, but it should never hold a value
that isn't 1 or 0. Any code that expects a different value in their BOOL should
be fixed.

rdar://51954400

Differential revision: https://reviews.llvm.org/D63856
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticGroups.tdclang.src/include/clang/Basic/DiagnosticGroups.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.tdclang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaChecking.cppclang.src/lib/Sema/SemaChecking.cpp
The file was added/cfe/trunk/test/Sema/tautological-objc-bool-compare.mclang.src/test/Sema/tautological-objc-bool-compare.m
Revision 365407 by jdoerfert:
[Attributor] Deduce the "returned" argument attribute

Deduce the "returned" argument attribute by collecting all potentially
returned values.

Not only the unique return value, if any, can be used by subsequent
attributes but also the set of all potentially returned values as well
as the mapping from returned values to return instructions that they
originate from (see AAReturnedValues::checkForallReturnedValues).

Change in statistics (-stats) for LLVM-TS + Spec2006, totaling ~19% more "returned" arguments.

  ADDED: attributor                   NumAttributesManifested                  n/a ->        637
  ADDED: attributor                   NumAttributesValidFixpoint               n/a ->      25545
  ADDED: attributor                   NumFnArgumentReturned                    n/a ->        637
  ADDED: attributor                   NumFnKnownReturns                        n/a ->      25545
  ADDED: attributor                   NumFnUniqueReturned                      n/a ->      14118
CHANGED: deadargelim                  NumRetValsEliminated                     470 ->        449 (    -4.468%)
REMOVED: functionattrs                NumReturned                              535 ->        n/a
CHANGED: indvars                      NumElimIdentity                          138 ->        164 (   +18.841%)

Reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames, efriedma, chandlerc

Subscribers: hiraditya, bollu, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D59919
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/Attributor.hllvm.src/include/llvm/Transforms/IPO/Attributor.h
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cppllvm.src/lib/Transforms/IPO/Attributor.cpp
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_nocapture.llllvm.src/test/Transforms/FunctionAttrs/arg_nocapture.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_returned.llllvm.src/test/Transforms/FunctionAttrs/arg_returned.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.llllvm.src/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll
Revision 365406 by dblaikie:
[cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable.

This is a fix for rG864949 which only disabled default construction and
assignment for lambdas with capture-defaults, where the C++2a draft
disables them for lambdas with any lambda-capture at all.

Patch by Logan Smith!

Differential Revision: https://reviews.llvm.org/D64058
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/DeclCXX.cppclang.src/lib/AST/DeclCXX.cpp
The file was modified/cfe/trunk/lib/Sema/SemaDeclCXX.cppclang.src/lib/Sema/SemaDeclCXX.cpp
The file was modified/cfe/trunk/test/SemaCXX/cxx2a-lambda-default-ctor-assign.cppclang.src/test/SemaCXX/cxx2a-lambda-default-ctor-assign.cpp
Revision 365405 by thegameg:
[Frontend] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

This fixes a modules issue:

error: declaration of 'bitc' must be imported from module
'Clang_Serialization.ASTBitCodes' before it is required
Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record);
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cppclang.src/lib/Frontend/SerializedDiagnosticPrinter.cpp
Revision 365404 by paquette:
[AArch64][GlobalISel] Use TST for comparisons when possible

Porting over the part of `emitComparison` in AArch64ISelLowering where we use
TST to represent a compare.

- Rename `tryOptCMN` to `tryFoldIntegerCompare`, since it now also emits TSTs
  when possible.

- Add a utility function for emitting a TST with register operands.

- Rename opt-fold-cmn.mir to opt-fold-compare.mir, since it now also tests the
  TST fold as well.

Differential Revision: https://reviews.llvm.org/D64371
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cppllvm.src/lib/Target/AArch64/AArch64InstructionSelector.cpp
The file was removed/llvm/trunk/test/CodeGen/AArch64/GlobalISel/opt-fold-cmn.mirllvm.src/test/CodeGen/AArch64/GlobalISel/opt-fold-cmn.mir
The file was added/llvm/trunk/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mirllvm.src/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
Revision 365402 by probinson:
Fix line endings. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/ps4-analyzer-defaults.cppclang.src/test/Driver/ps4-analyzer-defaults.cpp
Revision 365401 by xur:
[llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win

This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win
from r365386.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-profdata/same-filename.testllvm.src/test/tools/llvm-profdata/same-filename.test
Revision 365399 by ro:
[Sanitizers] Remove clang_rt.sancov_{begin,end} on Solaris

There's no point to manually create the __start___sancov_guards and __stop___sancov_guards
sections and labels on Solaris any longer.  They were originally introduced in
https://reviews.llvm.org/D40899 and https://reviews.llvm.org/D40903.

- The Solaris 11.4 ld supports creating them out of the box.
- We already unconditionally use Solaris 11.4 features like the ld -z gnu-version-script-compat option and fully working .preinit_array support in compiler-rt.
- The current files don't assemble on SPARC because the assembler syntax may be different between /bin/as and GNU as.

Tested on amd64-pc-solaris2.11.

Differential Revision: https://reviews.llvm.org/D63601
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txtcompiler-rt.src/lib/sanitizer_common/CMakeLists.txt
The file was removed/compiler-rt/trunk/lib/sanitizer_common/sancov_begin.Scompiler-rt.src/lib/sanitizer_common/sancov_begin.S
The file was removed/compiler-rt/trunk/lib/sanitizer_common/sancov_end.Scompiler-rt.src/lib/sanitizer_common/sancov_end.S
Revision 365398 by arsenm:
AMDGPU: Split extload/zextload local load patterns

This will help removing the custom load predicates, allowing the
global isel emitter to handle them.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructions.tdllvm.src/lib/Target/AMDGPU/AMDGPUInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/DSInstructions.tdllvm.src/lib/Target/AMDGPU/DSInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/EvergreenInstructions.tdllvm.src/lib/Target/AMDGPU/EvergreenInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.tdllvm.src/lib/Target/AMDGPU/SIInstrInfo.td
Revision 365396 by ro:
[Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris

As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end}
on Solaris any longer.

This companion patch to the above removes their use from the driver.

Tested on amd64-pc-solaris2.11

Differential Revision: https://reviews.llvm.org/D63602
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/ToolChains/Solaris.cppclang.src/lib/Driver/ToolChains/Solaris.cpp
Revision 365395 by void:
Add parentheses to silence warnings.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Tooling/Syntax/BuildTree.cppclang.src/lib/Tooling/Syntax/BuildTree.cpp
Revision 365394 by void:
Add parentheses to silence warning.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cppllvm.src/lib/Target/AMDGPU/SIFrameLowering.cpp
Revision 365393 by rnk:
Revert [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings

This reverts r365382 (git commit 8b1becf2e31d9170ee356a19c7b6ea991d3a520f)

Appears to regress this semi-reduced fragment of valid code from windows
SDK headers:

  #define InterlockedIncrement64 _InterlockedIncrement64
  extern "C" __int64 InterlockedIncrement64(__int64 volatile *Addend);
  #pragma intrinsic(_InterlockedIncrement64)
  unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) {
    return (unsigned __int64)(InterlockedIncrement64)((volatile __int64 *)Addend);
  }

Found on a buildbot here, but no mail was sent due to it already being
red:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48067
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/Expr.hclang.src/include/clang/AST/Expr.h
The file was modified/cfe/trunk/include/clang/Basic/Attr.tdclang.src/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/lib/Sema/SemaDecl.cppclang.src/lib/Sema/SemaDecl.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cppclang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExprCXX.cppclang.src/lib/Sema/SemaExprCXX.cpp
The file was modified/cfe/trunk/test/SemaObjC/arc-repeated-weak.mmclang.src/test/SemaObjC/arc-repeated-weak.mm
Revision 365387 by rnk:
Standardize on MSVC behavior for triples with no environment

Summary:
This makes it so that IR files using triples without an environment work
out of the box, without normalizing them.

Typically, the MSVC behavior is more desirable. For example, it tends to
enable things like constant merging, use of associative comdats, etc.

Addresses PR42491

Reviewers: compnerd

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64109
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cppllvm.src/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cppllvm.src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modified/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cppllvm.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modified/llvm/trunk/lib/IR/Mangler.cppllvm.src/lib/IR/Mangler.cpp
The file was modified/llvm/trunk/lib/MC/MCWinCOFFStreamer.cppllvm.src/lib/MC/MCWinCOFFStreamer.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cppllvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86Subtarget.hllvm.src/lib/Target/X86/X86Subtarget.h
The file was modified/llvm/trunk/test/CodeGen/X86/win_cst_pool.llllvm.src/test/CodeGen/X86/win_cst_pool.ll
The file was modified/llvm/trunk/unittests/ADT/TripleTest.cppllvm.src/unittests/ADT/TripleTest.cpp
Revision 365386 by xur:
llvm-profdata] Handle the cases of overlapping input file and output file

Currently llvm-profdata does not expect the same file name for the input profile
and the output profile.
>llvm-profdata merge A.profraw B.profraw -o B.profraw
The above command runs successfully but the resulted B.profraw is not correct.
This patch fixes the issue by moving the initialization of writer after loading
the profile.

For the show command, the following will report a confusing error of
"Empty raw profile file":
>llvm-profdata show B.profraw -o B.profraw
It's harder to fix as we need to output something before loading the input profile.
I don't think that a fix for this is worth the effort. I just make the error explicit for
the show command.

Differential Revision: https://reviews.llvm.org/D64360
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-1.proftextllvm.src/test/tools/llvm-profdata/Inputs/same-name-1.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-2.proftextllvm.src/test/tools/llvm-profdata/Inputs/same-name-2.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-3.proftextllvm.src/test/tools/llvm-profdata/Inputs/same-name-3.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-4.proftextllvm.src/test/tools/llvm-profdata/Inputs/same-name-4.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/same-filename.testllvm.src/test/tools/llvm-profdata/same-filename.test
The file was modified/llvm/trunk/tools/llvm-profdata/llvm-profdata.cppllvm.src/tools/llvm-profdata/llvm-profdata.cpp