SuccessChanges

Summary

  1. Revert "r372201: [Support] Replace function with function_ref in (details)
  2. [lldb] Print better diagnostics for user expressions and modules (details)
  3. [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (details)
  4. tsan: allow the Go runtime to return multiple stack frames for a single (details)
  5. [clang-tidy] Fix a potential infinite loop in (details)
  6. [Alignment] Add a None() member function (details)
  7. [AMDGPU] Allow FP inline constant in v_madak_f16 and v_fmaak_f16 (details)
  8. [cmake] Changes to get Windows self-host working with PGO (details)
  9. [lldb][CMake] Infer `Clang_DIR` if not passed explicitly (details)
  10. Fix -Wdocumentation "Unknown param" warning. NFCI. (details)
  11. Fix -Wdocumentation "@returns in a void function" warning. NFCI. (details)
  12. [lldb][CMake] Build LLDB.framework with -Wdocumentation in Xcode (details)
  13. Fix -Wdocumentation "empty paragraph passed to '\brief'" warning. NFCI. (details)
Commit 377aaa2ede8ce0bc73a85fb2f3b29cd07d79535c by ibiryukov
Revert "r372201: [Support] Replace function with function_ref in
writeFileAtomically. NFC"
function_ref causes calls to the function to be ambiguous, breaking
compilation.
Reverting for now.
llvm-svn: 372202
The file was modifiedllvm/include/llvm/Support/FileUtilities.h
The file was modifiedllvm/lib/Support/FileUtilities.cpp
Commit 1442efea9a045851a4c16908832f528574fb440e by Raphael Isemann
[lldb] Print better diagnostics for user expressions and modules
Summary: Currently our expression evaluators only prints very basic
errors that are not very useful when writing complex expressions.
For example, in the expression below the user made a type error, but
it's not clear from the diagnostic what went wrong:
```
(lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
error: invalid operands to binary expression ('int' and 'double')
```
This patch enables full Clang diagnostics in our expression evaluator.
After this patch the diagnostics for the expression look like this:
```
(lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
error: <user expression 1>:1:54: invalid operands to binary expression
('int' and 'float') printf("Modulos are:", foobar%mo1, foobar%mo2,
foobar%mo3)
                                              ~~~~~~^~~~
```
To make this possible, we now emulate a user expression file within our
diagnostics. This prevents that the user is exposed to our internal
wrapper code we inject.
Note that the diagnostics that refer to declarations from the debug
information (e.g. 'note' diagnostics pointing to a called function) will
not be improved by this as they don't have any source locations
associated with them, so caret or line printing isn't possible. We
instead just suppress these diagnostics as we already do with warnings
as they would otherwise just be a context message without any context
(and the original diagnostic in the user expression should be enough to
explain the issue).
Fixes rdar://24306342
Reviewers: JDevlieghere, aprantl, shafik, #lldb
Reviewed By: JDevlieghere, #lldb
Subscribers: usaxena95, davide, jingham, aprantl, arphaman, kadircet,
lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D65646
llvm-svn: 372203
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
The file was modifiedclang/lib/Frontend/TextDiagnostic.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
The file was addedlldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile
The file was addedlldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticOptions.def
The file was addedlldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Commit dc2a7f5b39213bdc7574cabd3131ba0215c11e8e by sander.desmalen
[AArch64][DebugInfo] Do not recompute CalleeSavedStackSize
This patch fixes a bug exposed by D65653 where a subsequent invocation
of `determineCalleeSaves` ends up with a different size for the callee
save area, leading to different frame-offsets in debug information.
In the invocation by PEI, `determineCalleeSaves` tries to determine
whether it needs to spill an extra callee-saved register to get an
emergency spill slot. To do this, it calls 'estimateStackSize' and
manually adds the size of the callee-saves to this. PEI then allocates
the spill objects for the callee saves and the remaining frame layout is
calculated accordingly.
A second invocation in LiveDebugValues causes estimateStackSize to
return the size of the stack frame including the callee-saves. Given
that the size of the callee-saves is added to this, these callee-saves
are counted twice, which leads `determineCalleeSaves` to believe the
stack has become big enough to require spilling an extra callee-save as
emergency spillslot. It then updates CalleeSavedStackSize with a larger
value.
Since CalleeSavedStackSize is used in the calculation of the frame
offset in getFrameIndexReference, this leads to incorrect offsets for
variables/locals when this information is recalculated after PEI.
Reviewers: omjavaid, eli.friedman, thegameg, efriedma
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D66935
llvm-svn: 372204
The file was modifiedllvm/test/DebugInfo/MIR/Mips/live-debug-values-reg-copy.mir
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.h
The file was modifiedllvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
The file was addedllvm/test/CodeGen/AArch64/wrong-callee-save-size-after-livedebugvariables.mir
The file was modifiedllvm/lib/CodeGen/RegUsageInfoCollector.cpp
The file was modifiedllvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
Commit d97865e530df4ad2ed9c2a999edf0a19ee567e79 by dvyukov
tsan: allow the Go runtime to return multiple stack frames for a single
PC
This fix allows tsan to report stack traces correctly even in the
presence of mid-stack inlining by the Go compiler.
See https://go-review.googlesource.com/c/go/+/195781 for the Go runtime
side of this change.
Author: randall77 (Keith Randall) Reviewed:
https://reviews.llvm.org/D67671 llvm-svn: 372205
The file was modifiedcompiler-rt/lib/tsan/go/tsan_go.cpp
Commit d94c7bf06e00582c07fc0e9d215710eb6866f79b by hokein
[clang-tidy] Fix a potential infinite loop in
readability-isolate-declaration check.
Reviewers: ilya-biryukov
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67654
llvm-svn: 372206
The file was modifiedclang-tools-extra/clang-tidy/utils/LexerUtils.h
The file was addedclang-tools-extra/test/clang-tidy/readability-isolate-declaration-no-infinite-loop.cpp
Commit ef8ef1278af826f2489649c30b828e5542302eef by gchatelet
[Alignment] Add a None() member function
Summary: This will allow writing `if(A != llvm::Align::None())` which is
clearer than `if(A > llvm::Align(1))`
This is patch is part of a series to introduce an Alignment type. See
this thread for context:
http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this
patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67697
llvm-svn: 372207
The file was modifiedllvm/unittests/Support/AlignmentTest.cpp
The file was modifiedllvm/include/llvm/Support/Alignment.h
Commit 178611711122554be1e1a652cc151776cf1caca9 by tpr.llvm
[AMDGPU] Allow FP inline constant in v_madak_f16 and v_fmaak_f16
Differential Revision: https://reviews.llvm.org/D67680
Change-Id: Ic38f47cb2079c2c1070a441b5943854844d80a7c llvm-svn: 372208
The file was modifiedllvm/test/CodeGen/AMDGPU/twoaddr-fma.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/twoaddr-mad.mir
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
Commit a84b200e6048211ae74c511a1660fb2c2c5567da by russell.gallop
[cmake] Changes to get Windows self-host working with PGO
Fixes quoting of profile arguments to work on Windows Suppresses adding
profile arguments to linker flags when using lld-link Avoids
-fprofile-instr-use being added to rc.exe flags Removes duplicated
adding of -fprofile-instr-use to linker flags (since r355541) Move
handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake
Differential Revision: https://reviews.llvm.org/D62063
llvm-svn: 372209
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake
The file was modifiedllvm/CMakeLists.txt
Commit a206de8a0e6a657b5c5a48e894383590ef942fc7 by stefan.graenitz
[lldb][CMake] Infer `Clang_DIR` if not passed explicitly
Summary: If we only get `LLVM_DIR` and find Clang in the same provided
build-tree, automatically infer `Clang_DIR` like this:
``` LLVM_DIR = /path/to/build-llvm/lib/cmake/llvm Clang_DIR =
/paht/to/build-llvm/lib/cmake/clang
```
Reviewers: JDevlieghere, jingham, xiaobai, compnerd, labath
Reviewed By: JDevlieghere, labath
Subscribers: mgorny, lldb-commits, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D65798
llvm-svn: 372210
The file was modifiedlldb/docs/resources/build.rst
The file was modifiedlldb/cmake/modules/LLDBStandalone.cmake
Commit 2dba9a2a9dfac822bd54f356fc96c60d85481c83 by llvm-dev
Fix -Wdocumentation "Unknown param" warning. NFCI.
llvm-svn: 372211
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit 858d755c27216eea5c998f640885382025ca3031 by llvm-dev
Fix -Wdocumentation "@returns in a void function" warning. NFCI.
llvm-svn: 372212
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
Commit 2c72b41757563eaf56f083f468f1b78545a9b549 by stefan.graenitz
[lldb][CMake] Build LLDB.framework with -Wdocumentation in Xcode
llvm-svn: 372213
The file was modifiedlldb/cmake/modules/LLDBFramework.cmake
Commit f8e3036522f3fba44d5e58caf6e29776614cd226 by llvm-dev
Fix -Wdocumentation "empty paragraph passed to '\brief'" warning. NFCI.
llvm-svn: 372214
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h