SuccessChanges

Summary

  1. [lldb] Give TestDefaultTemplateArgs a unique class name (details)
  2. FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef (details)
  3. Remove dead code added in ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9, NFC (details)
  4. [llvm-symbolizer] Fix typo in llvm-symbolizer test from a previous commit. (details)
  5. [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs (details)
  6. [InlineCost] prefer range-for. NFC (details)
  7. Fix GCC 5.3 compile error in ASTImporter code (details)
  8. [libcxx] remove checks for __STDCPP_THREADS__ as it is defined by compiler (details)
  9. [AArch64][GlobalISel] Fix crash during legalization of a vector G_SELECT with scalar mask. (details)
  10. [WinASan] Improve exception reporting accuracy (details)
Commit 1b9f214efca7d5855f4e3dd1969c4cbe77078f97 by Jonas Devlieghere
[lldb] Give TestDefaultTemplateArgs a unique class name

Multiple tests cannot share the same test class name.
The file was modifiedlldb/test/API/lang/cpp/default-template-args/TestDefaultTemplateArgs.py
Commit 1b042de5b29af4869a77ecbc632029fba0313dec by Duncan P. N. Exon Smith
FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef

Add `FileEntryRef::getDir`, which returns a `DirectoryEntryRef`. This
includes a few changes:

- Customize `OptionalStorage` so that `Optional<DirectoryEntryRef>` is
  pointer-sized (like the change made to `Optional<FileEntryRef>`).
  Factored out a common class, `FileMgr::MapEntryOptionalStorage`, to
  reduce the code duplication.
- Store an `Optional<DirectoryEntryRef>` in `FileEntryRef::MapValue`.
  This is set if and only if `MapValue` has a real `FileEntry`.
- Change `FileManager::getFileRef` and `getVirtualFileRef` to use
  `getDirectoryRef` and store it in the `StringMap` for `FileEntryRef`.

Differential Revision: https://reviews.llvm.org/D90484
The file was modifiedclang/lib/Basic/FileManager.cpp
The file was modifiedclang/include/clang/Basic/DirectoryEntry.h
The file was modifiedclang/unittests/Basic/FileEntryTest.cpp
The file was modifiedclang/include/clang/Basic/FileEntry.h
Commit 94f537c6b2bb55c8e058a9989d02ab0d68a0c61a by Duncan P. N. Exon Smith
Remove dead code added in ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9, NFC

This was a copy/paste bug; `M0` is never referenced later.
The file was modifiedclang/unittests/Basic/FileEntryTest.cpp
Commit 8cdf4920c47ddd3d60bdc3298f525512d483ce65 by akhuang
[llvm-symbolizer] Fix typo in llvm-symbolizer test from a previous commit.

(Commit was 00bbef2bb20cf212722de282e4eb9afd09ab50db)
The file was modifiedlld/test/COFF/symbolizer-inline.s
Commit cf8ff75bade763b054476321dcb82dcb2e7744c7 by leonardchan
[clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs

Thanks to D77248, we can bypass the use of stubs altogether and use PLT
relocations if they are available for the target. LLVM and LLD support the
R_AARCH64_PLT32 relocation, so we can also guarantee a static PLT relocation on AArch64.
Not emitting these stubs saves a lot of extra binary size.

Differential Revision: https://reviews.llvm.org/D83812
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/type-info.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
The file was modifiedclang/lib/CodeGen/CGVTables.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/diamond-virtual-inheritance.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/multiple-inheritance.cpp
The file was removedclang/test/CodeGenCXX/RelativeVTablesABI/pass-byval-attributes.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
The file was removedclang/test/CodeGenCXX/RelativeVTablesABI/no-stub-when-dso-local.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/diamond-inheritance.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
The file was modifiedclang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
The file was removedclang/test/CodeGenCXX/RelativeVTablesABI/stub-linkages.cpp
Commit 91aff1d8bae02fc65970b52895f05d3574cbb481 by ndesaulniers
[InlineCost] prefer range-for. NFC

Prefer range-for over iterators when such methods exist. Precommitted
from https://reviews.llvm.org/D91816.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D92350
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
Commit 43b5b485a203f190ee4d5d3cab19c44ca865d316 by rnk
Fix GCC 5.3 compile error in ASTImporter code

Try to simplify this code a different way: use less Expected, more
outparams.
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit 871f96eed3797061c8b1c82fb77d077d110a2da7 by zequanwu
[libcxx] remove checks for __STDCPP_THREADS__ as it is defined by compiler

Differential Revision: https://reviews.llvm.org/D92349
The file was modifiedlibcxx/include/__config
Commit 87ff156414370043cf149e0c77513c5227b336b1 by Amara Emerson
[AArch64][GlobalISel] Fix crash during legalization of a vector G_SELECT with scalar mask.

The lowering of vector selects needs to first splat the scalar mask into a vector
first.

This was causing a crash when building oggenc in the test suite.

Differential Revision: https://reviews.llvm.org/D91655
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-select.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit b5af5787b367198f8b87626431cb3f66fef460c1 by rnk
[WinASan] Improve exception reporting accuracy

Previously, ASan would produce reports like this:
ERROR: AddressSanitizer: breakpoint on unknown address 0x000000000000 (pc 0x7fffdd7c5e86 ...)

This is unhelpful, because the developer may think this is a null
pointer dereference, and not a breakpoint exception on some PC.

The cause was that SignalContext::GetAddress would read the
ExceptionInformation array to retreive an address for any kind of
exception. That data is only available for access violation exceptions.
This changes it to be conditional on the exception type, and to use the
PC otherwise.

I added a variety of tests for common exception types:
- int div zero
- breakpoint
- ud2a / illegal instruction
- SSE misalignment

I also tightened up IsMemoryAccess and GetWriteFlag to check the
ExceptionCode rather than looking at ExceptionInformation[1] directly.

Differential Revision: https://reviews.llvm.org/D92344
The file was addedcompiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp
The file was addedcompiler-rt/test/asan/TestCases/Windows/breakpoint.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_win.cpp
The file was addedcompiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp
The file was addedcompiler-rt/test/asan/TestCases/Windows/sse_misalignment.cpp