LLVM/llvm 349159compiler-rt/trunk/test/asan/TestCases interception_failure_test.cc

Mark interception_failure_test.cc as passing for NetBSD and asan-dynamic-runtime

LLVM/llvm 349158llvm/trunk/lib/Target/PowerPC README.txt

NFC. Adding an empty line to test the updated commit credentials.

LLVM/llvm 349157lldb/trunk/include/lldb/Core Broadcaster.h, lldb/trunk/include/lldb/Utility Broadcaster.h

Move Broadcaster+Listener+Event combo from Core into Utility

Summary:
These are general purpose "utility" classes, whose functionality is not
debugger-specific in any way. As such, I believe they belong in the
Utility module.

This doesn't break any particular dependency (yet), but it reduces the
number of Core dependencies across the board.

Reviewers: zturner, jingham, teemperor, clayborg

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D55361

LLVM/llvm 349156compiler-rt/trunk/test/asan lit.cfg

Set shared_libasan_path in lit tests for NetBSD

Reuse the Linux code path.

LLVM/llvm 349155cfe/trunk/lib/CodeGen CodeGenModule.cpp, cfe/trunk/lib/Driver/ToolChains Clang.cpp

Implement -frecord-command-line (-frecord-gcc-switches)

Implement options in clang to enable recording the driver command-line
in an ELF section.

Implement a new special named metadata, llvm.commandline, to support
frontends embedding their command-line options in IR/ASM/ELF.

This differs from the GCC implementation in some key ways:

* In GCC there is only one command-line possible per compilation-unit,
  in LLVM it mirrors llvm.ident and multiple are allowed.
* In GCC individual options are separated by NULL bytes, in LLVM entire
  command-lines are separated by NULL bytes. The advantage of the GCC
  approach is to clearly delineate options in the face of embedded
  spaces. The advantage of the LLVM approach is to support merging
  multiple command-lines unambiguously, while handling embedded spaces
  with escaping.

Differential Revision: https://reviews.llvm.org/D54487
Clang Differential Revision: https://reviews.llvm.org/D54489

LLVM/llvm 349154lldb/trunk/unittests/Process/minidump CMakeLists.txt

Fix minidump unit test failures from r349062

This commit added new test inputs, but it did not add them to the cmake
files. This caused the test to fail at runtime.

While in there, I also sorted the list of minidump test inputs.

LLVM/llvm 349153lldb/trunk/include/lldb lldb-enumerations.h

Fix build with older (<3.0) swigs

It turns out it wasn't the compilers, but swig who had issues with my
previous patch -- older versions do not recognise the "constexpr"
keyword.

Fortunately, that can be fixed the same way we fix all other swig
incompatibilities: #ifndef SWIG.

LLVM/llvm 349152clang-tools-extra/trunk/clangd/index/dex/dexp Dexp.cpp

[dexp] Change FuzzyFind to also print scope of symbols

Summary:
When there are multiple symbols in the result of a fuzzy find with the
same name, one has to perform an additional query to figure out which of those
symbols are coming from the "interesting" scope. This patch prints the scope in
fuzzy find results to get rid of the second symbol.

Reviewers: hokein

Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D55705

LLVM/llvm 349151llvm/trunk/lib/CodeGen RegAllocGreedy.cpp, llvm/trunk/test/CodeGen/AMDGPU subreg-split-live-in-error.mir

[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers

It costs nothing to spill an IMPLICIT_DEF value (the only spill code that's
generated is a KILL of the value), so when creating split constraints if the
live-out value is IMPLICIT_DEF the exit constraint should be DontCare instead
of PrefReg.

Differential Revision: https://reviews.llvm.org/D55652

LLVM/llvm 349150clang-tools-extra/trunk/include-fixer/tool clang-include-fixer.el

clang-include-fixer.el: support remote files

Summary: Support remote files (e.g., Tramp) in the Emacs integration for 
clang-include-fixer

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D54672

LLVM/llvm 349149lldb/trunk/include/lldb lldb-enumerations.h

Mark Permissions as a bitmask enum

this allows one to use bitwise operators on the variables of this type
without complicated casting.

The gotcha here is that the combinations of these enums were being used
in some constexpr contexts such as case labels (case
ePermissionsWritable | ePermissionsExecutable:), which is not possible
if the user-defined operator| is not constexpr.

So, this commit also marks these operators as constexpr. I am committing
this as a small standalone patch so it can be easily reverted if some
compiler has an issue with this.

LLVM/llvm 349148clang-tools-extra/trunk/unittests/clangd HeadersTests.cpp

[clangd] Use buildCompilerInvocation to simplify the HeadersTests, NFC.

LLVM/llvm 349147llvm/trunk/lib/Target/ARM ARMLegalizerInfo.cpp, llvm/trunk/test/CodeGen/ARM/GlobalISel thumb-select-casts.mir arm-legalize-casts.mir

[ARM GlobalISel] Thumb2: casts between int and ptr

Mark as legal and add tests. Nothing special to do.

LLVM/llvm 349146llvm/trunk/test/CodeGen/ARM/GlobalISel arm-legalizer.mir

[ARM GlobalISel] Remove duplicate test. NFCI

Fixup for r349026. I forgot to delete these test functions from the
original file when I moved them to arm-legalize-exts.mir.

LLVM/llvm 349145clang-tools-extra/trunk/unittests/clangd TestTU.cpp

[clangd] Fix memory leak in ClangdTests.

Summary:
createInvocationFromCommandLine sets DisableFree to true by default,
which leads memory leak in clangd. The fix is to  use the `BuildCompilationInvocation`
to create CI with the correct options (DisableFree is false).

Fix https://bugs.llvm.org/show_bug.cgi?id=39991.

Reviewers: kadircet

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D55702

LLVM/llvm 349144clang-tools-extra/trunk/clangd/index Background.cpp, clang-tools-extra/trunk/unittests/clangd BackgroundIndexTests.cpp

[clangd] Fix an assertion failure in background index.

Summary:
When indexing a file which contains an uncompilable error, we will
trigger an assertion failure -- the IndexFileIn data is not set, but we
access them in the backgound index.

Reviewers: kadircet

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D55650

LLVM/llvm 349143llvm/trunk/lib/Target/ARM ARMInstructionSelector.cpp

[ARM GlobalISel] Minor refactoring. NFCI

Refactor the ARMInstructionSelector to cache some opcodes in the
constructor instead of checking all the time if we're in ARM or Thumb
mode.

LLVM/llvm 349142llvm/trunk/lib/Target/ARM ARMLegalizerInfo.cpp, llvm/trunk/test/CodeGen/ARM/GlobalISel arm-legalize-binops.mir arm-legalizer.mir

[ARM GlobalISel] Allow simple binary ops in Thumb2

Mark G_ADD, G_SUB, G_MUL, G_AND, G_OR and G_XOR as legal for both ARM
and Thumb2.

Extract the legalizer tests for these opcodes into another file.

Add tests for the instruction selector.

LLVM/llvm 349141llvm/trunk/utils/TableGen AsmWriterEmitter.cpp

[TableGen:AsmWriter] Cope with consecutive tied operands.

When you define an instruction alias as a subclass of InstAlias, you
specify all the MC operands for the instruction it expands to, except
for operands that are tied to a previous one, which you leave out in
the expectation that the Tablegen output code will fill them in
automatically.

But the code in Tablegen's AsmWriter backend that skips over a tied
operand was doing it using 'if' instead of 'while', because it wasn't
expecting to find two tied operands in sequence.

So if an instruction updates a pair of registers in place, so that its
MC representation has two input operands tied to the output ones (for
example, Arm's UMLAL instruction), then any alias which wants to
expand to a special case of that instruction is likely to fail to
match, because the indices of subsequent operands will be off by one
in the generated printAliasInstr function.

This patch re-indents some existing code, so it's clearest when
viewed as a diff with whitespace changes ignored.

Reviewers: fhahn, rengolin, sdesmalen, atanasyan, asb, jholewinski, t.p.northover, 
kparzysz, craig.topper, stoklund


    [5 lines not shown]

LLVM/llvm 349140libunwind/trunk/include libunwind.h, libunwind/trunk/src DwarfInstructions.hpp DwarfParser.hpp

[AArch64][libunwind] Unwinding support for return address signing

- Follow up to revision r342895
- gcc would not build libunwind with the earlier patch as the autia1716
  instruction wasn't allowed to be assembled for pre armv8.3a targets
- The autia1716 instruction lives in the hint space encodings so is a valid
  instruction for all armv8a targets
- To work around this I have swapped out the autia1716 instruction for the hint
  instruction

Differential Revision: https://reviews.llvm.org/D55700

LLVM/llvm 349139llvm/trunk/tools/llvm-exegesis/lib Clustering.cpp

Revert rL349136: [llvm-exegesis] Optimize ToProcess in dbScan

Summary:
Use `vector<char> Added + vector<size_t> ToProcess` to replace `SetVector ToProcess`

We also check `Added[P]` to enqueueing a point more than once, which
also saves us a `ClusterIdForPoint_[Q].isUndef()` check.

Reviewers: courbet, RKSimon, gchatelet, john.brawn, lebedev.ri

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D54442
........
Patch wasn't approved and breaks buildbots

LLVM/llvm 349138compiler-rt/trunk/lib/asan asan_allocator.h, compiler-rt/trunk/lib/lsan lsan_allocator.h

Introduce `AddressSpaceView` template parameter to `SizeClassAllocator32`, `FlatByteMap`, 
and `TwoLevelByteMap`.

Summary:
This is a follow up patch to r346956 for the `SizeClassAllocator32`
allocator.

This patch makes `AddressSpaceView` a template parameter both to the
`ByteMap` implementations (but makes `LocalAddressSpaceView` the
default), some `AP32` implementations and is used in `SizeClassAllocator32`.
The actual changes to `ByteMap` implementations and
`SizeClassAllocator32` are very simple. However the patch is large
because it requires changing all the `AP32` definitions, and users of
those definitions.

For ASan and LSan we make `AP32` and `ByteMap` templateds type that take
a single `AddressSpaceView` argument. This has been done because we will
instantiate the allocator with a type that isn't `LocalAddressSpaceView`
in the future patches. For the allocators used in the other sanitizers
(i.e. HWAsan, MSan, Scudo, and TSan) use of `LocalAddressSpaceView` is
hard coded because we do not intend to instantiate the allocators with
any other type.

In the cases where untemplated types have become templated on a single
`AddressSpaceView` parameter (e.g. `PrimaryAllocator`) their name has

    [17 lines not shown]

LLVM/llvm 349137llvm/trunk/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/trunk/lib/Target/X86 X86ISelLowering.cpp

[DAGCombiner][X86] Prevent visitSIGN_EXTEND from returning N when (sext (setcc)) already 
has the target desired type for the setcc

Summary:
If the setcc already has the target desired type we can reach the getSetCC/getSExtOrTrunc 
after the MatchingVecType check with the exact same types as the nodes we started with. 
This causes those causes VsetCC to be CSEd to N0 and the getSExtOrTrunc will CSE to N. 
When we return N, the caller will think that meant we called CombineTo and did our own 
worklist management. But that's not what happened. This prevents target hooks from being 
called for the node.

To fix this, I've now returned SDValue if the setcc is already the desired type. But to 
avoid some regressions in X86 I've had to disable one of the target combines that wasn't 
being reached before in the case of a (sext (setcc)). If we get vector widening 
legalization enabled that entire function will be deleted anyway so hopefully this is only 
for the short term.

Reviewers: RKSimon, spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D55459

LLVM/llvm 349136llvm/trunk/tools/llvm-exegesis/lib Clustering.cpp

[llvm-exegesis] Optimize ToProcess in dbScan

Summary:
Use `vector<char> Added + vector<size_t> ToProcess` to replace `SetVector ToProcess`

We also check `Added[P]` to enqueueing a point more than once, which
also saves us a `ClusterIdForPoint_[Q].isUndef()` check.

Reviewers: courbet, RKSimon, gchatelet, john.brawn, lebedev.ri

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D54442

LLVM/llvm 349135llvm/trunk/test/ThinLTO/X86 function_entry_count.ll

[ThinLTO] Fix test added in rL349076

LLVM/llvm 349134compiler-rt/trunk/lib/sanitizer_common sanitizer_linux.cc

[sanitizer] Fix nolibc internal_sleep

Reviewers: kubamracek, vitalybuka

Reviewed By: vitalybuka

Subscribers: delcypher, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D55692

LLVM/llvm 349133llvm/trunk/include/llvm/Object ELF.h, llvm/trunk/lib/Object ELF.cpp

[Object] Rename getRelrRelocationType to getRelativeRelocationType

Summary:
The two utility functions were added in D47919 to support SHT_RELR.
However, these are just relative relocations types and are't
necessarily be named Relr.

Reviewers: phosek, dberris

Reviewed By: dberris

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D55691

LLVM/llvm 349132clang-tools-extra/trunk/clang-tidy/plugin ClangTidyPlugin.cpp, clang-tools-extra/trunk/clang-tidy/tool ClangTidyMain.cpp

[clang-tidy] Remove extra config.h includes

It's included in a new header ClangTidyForceLinker.h and should not
be included the second time.

Follow up for the https://reviews.llvm.org/D55595

LLVM/llvm 349131clang-tools-extra/trunk/clang-tidy ClangTidyForceLinker.h, clang-tools-extra/trunk/clang-tidy/plugin ClangTidyPlugin.cpp

[clang-tidy] Share the forced linking code between clang-tidy tool and plugin

Extract code that forces linking to the separate header and include it in both plugin and 
standalone tool.
Try 2: missing header guard and "clang/Config/config.h" are added to the new header.

Differential Revision: https://reviews.llvm.org/D55595

LLVM/llvm 349130llvm/trunk/lib/XRay InstrumentationMap.cpp

[llvm-xray] Use correct variable name

This fixes the compiler error introduced in r349129.

LLVM/llvm 349129llvm/trunk/lib/XRay InstrumentationMap.cpp

[llvm-xray] Store offset pointers in temporaries

DataExtractor::getU64 modifies the OffsetPtr which also pass to
RelocateOrElse which breaks on Windows. This addresses the issue
introduced in r349120.

Differential Revision: https://reviews.llvm.org/D55689

LLVM/llvm 349128lldb/trunk/source/Plugins/SymbolFile/NativePDB SymbolFileNativePDB.cpp

Remove unused variable.

LLVM/llvm 349127libcxx/trunk/utils/google-benchmark/src console_reporter.cc, libcxx/trunk/utils/google-benchmark/test output_test_helper.cc reporter_output_test.cc

Update google benchmark again

LLVM/llvm 349126libcxx/trunk/utils/google-benchmark BUILD.bazel README.md, libcxx/trunk/utils/google-benchmark/src sysinfo.cc

Update google benchmark version

LLVM/llvm 349125cfe/trunk/include/clang/Basic DiagnosticSemaKinds.td DiagnosticCommonKinds.td, cfe/trunk/lib/CrossTU CrossTranslationUnit.cpp

Fix up diagnostics.

Move some diagnostics around between Diagnostic*Kinds.td files.  Diagnostics
used in multiple places were moved to DiagnosticCommonKinds.td.  Diagnostics
listed in the wrong place (ie, Sema diagnostics listed in
DiagnosticsParseKinds.td) were moved to the correct places.  One diagnostic
split into two so that the diagnostic string is in the .td file instead of in
code.  Cleaned up the diagnostic includes after all the changes.

LLVM/llvm 349124llvm/trunk/utils/gn/secondary/llvm/lib/BinaryFormat BUILD.gn, llvm/trunk/utils/gn/secondary/llvm/lib/LTO BUILD.gn

[gn build] Merge r348963 and r349076

LLVM/llvm 349123clang-tools-extra/trunk/clang-tidy/google FunctionNamingCheck.cpp, clang-tools-extra/trunk/test/clang-tidy google-objc-function-naming.m google-objc-function-naming.mm

[clang-tidy] Improve google-objc-function-naming diagnostics 📙

Summary:
The diagnostics from google-objc-function-naming check will be more
actionable if they provide a brief description of the requirements from
the Google Objective-C style guide. The more descriptive diagnostics may
help clarify that functions in the global namespace must have an
appropriate prefix followed by Pascal case (engineers working previously
with static functions might not immediately understand the different
requirements of static and non-static functions).

Test Notes:
Verified against the clang-tidy tests.

Reviewers: benhamilton, aaron.ballman

Reviewed By: benhamilton

Subscribers: MyDeveloperDay, xazax.hun, cfe-commits

Differential Revision: https://reviews.llvm.org/D55482

LLVM/llvm 349122lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump TestMiniDump.py, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new TestMiniDumpNew.py

Fix test failures that depended on module order

LLVM/llvm 349121clang-tools-extra/trunk/clang-tidy ClangTidyForceLinker.h, clang-tools-extra/trunk/clang-tidy/plugin ClangTidyPlugin.cpp

Revert "[clang-tidy] Share the forced linking code between clang-tidy tool and plugin"

This reverts commit r349038 as it was causing test failures:

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/22185
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40886

LLVM/llvm 349120llvm/trunk/lib/XRay InstrumentationMap.cpp, llvm/trunk/test/tools/llvm-xray/X86 extract-instrmap-pie.ll

[llvm-xray] Support for PIE

When the instrumented binary is linked as PIE, we need to apply the
relative relocations to sleds. This is handled by the dynamic linker
at runtime, but when processing the file we have to do it ourselves.

Differential Revision: https://reviews.llvm.org/D55542

LLVM/llvm 349119llvm/trunk/lib/IR Module.cpp, llvm/trunk/lib/MC MCAsmStreamer.cpp MachObjectWriter.cpp

[macho] save the SDK version stored in module metadata into the version min and
build version load commands in the object file

This commit introduces a new metadata node called "SDK Version". It will be set
by the frontend to mark the platform SDK (macOS/iOS/etc) version which was used
during that particular compilation.
This node is used when machine code is emitted, by either saving the SDK version
into the appropriate macho load command (version min/build version), or by
emitting the assembly for these load commands with the SDK version specified as
well.
The assembly for both load commands is extended by allowing it to contain the
sdk_version X, Y [, Z] trailing directive to represent the SDK version
respectively.

rdar://45774000

Differential Revision: https://reviews.llvm.org/D55612

LLVM/llvm 349118cfe/trunk/bindings/python/tests/cindex test_diagnostics.py

Revert "Try to update the test to fix the breakage With the new warning, we are showing 
one more output in the test."

This reverts commit r349064.

This wasn't updating the right test.  Causing (not the different line number
from the previous revert):

======================================================================
FAIL: test_diagnostic_warning (tests.cindex.test_diagnostics.TestDiagnostics)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py", 
line 18, in test_diagnostic_warning
    self.assertEqual(len(tu.diagnostics), 2)
AssertionError: 1 != 2

LLVM/llvm 349117cfe/trunk/lib/Sema SemaExpr.cpp, cfe/trunk/test/SemaCXX string-plus-int.cpp

Revert "Make -Wstring-plus-int warns even if when the result is not out of bounds"

This reverts commit r349054.

It's causing:

FAILED: tools/clang/bindings/python/tests/CMakeFiles/check-clang-python
FAIL: test_diagnostic_range (tests.cindex.test_diagnostics.TestDiagnostics)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
  
"/Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py",
  line 55, in test_diagnostic_range
      self.assertEqual(len(tu.diagnostics), 1)
      AssertionError: 2 != 1

======================================================================
FAIL: test_diagnostic_warning (tests.cindex.test_diagnostics.TestDiagnostics)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
  
"/Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/bindings/python/tests/cindex/test_diagnostics.py",
  line 18, in test_diagnostic_warning

    [2 lines not shown]

LLVM/llvm 349116lnt/trunk/tests/utils blast.py

whitespace fixups to blast

LLVM/llvm 349115compiler-rt/trunk/lib/asan asan_malloc_win.cc asan_win_dll_thunk.cc

Windows ASan: Instrument _msize_base()

Summary:
A recent update to the VS toolchain in chromium [1] broke the windows
ASan bot because the new toolchain calls _msize_base() instead of
_msize() in a number of _aligned_* UCRT routines. Instrument
_msize_base() as well.

[1] https://crbug.com/914947

Reviewers: rnk, #sanitizers, vitalybuka

Reviewed By: rnk, #sanitizers, vitalybuka

Subscribers: vitalybuka, kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D55684

LLVM/llvm 349114lnt/trunk tox.ini

Tox based testing

Tox is really handy for building a venv and running all the tests and
qualification tasks in a repeatable way.
DeltaFile
+30-0lnt/trunk/tox.ini
+30-01 files

LLVM/llvm 349113lnt/trunk setup.py, lnt/trunk/lnt/util stats.py

pep8 whitespace fixups

LLVM/llvm 349112lnt/trunk/lnt/tests nt.py

Unused import

LLVM/llvm 349111lnt/trunk setup.cfg

Seems like a lot of E266 in the lit test cases, disable that

LLVM/llvm 349110lnt/trunk requirements.client.txt

Use ToT lit

This is good testing for lit, and will make sure we don't get stuck
in an old version.