diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-10-04 20:28:01 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-10-04 20:28:01 +0000 |
commit | 90dc620fb48ec8f63a2ce7741935e18b91602530 (patch) | |
tree | ab9779d6c836a1767986fad50e2bfe477b1fc3a8 /gnu/llvm | |
parent | c3f092f69d436105a49162679ffd1ed7a74169c2 (diff) |
Import LLVM 5.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm')
39 files changed, 160 insertions, 176 deletions
diff --git a/gnu/llvm/lib/Target/Hexagon/HexagonDepDecoders.h b/gnu/llvm/lib/Target/Hexagon/HexagonDepDecoders.h index 020362a9590..aa9787ecf0c 100644 --- a/gnu/llvm/lib/Target/Hexagon/HexagonDepDecoders.h +++ b/gnu/llvm/lib/Target/Hexagon/HexagonDepDecoders.h @@ -1,4 +1,4 @@ -//===- HexagonDepDecoders.h -----------------------------------------------===// +//===--- HexagonDepDecoders.h ---------------------------------------------===// // // The LLVM Compiler Infrastructure // @@ -6,8 +6,59 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// Automatically generated file, please consult code owner before editing. -//===----------------------------------------------------------------------===// - - +static DecodeStatus s4_0ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<4>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s29_3ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<14>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s8_0ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<8>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s4_3ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<7>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s31_1ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<12>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s3_0ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<3>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s30_2ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<13>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s6_0ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<6>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s6_3ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<9>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s4_1ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<5>(MI, tmp, Decoder); + return MCDisassembler::Success; +} +static DecodeStatus s4_2ImmDecoder(MCInst &MI, unsigned tmp, + uint64_t, const void *Decoder) { + signedDecoder<6>(MI, tmp, Decoder); + return MCDisassembler::Success; +} diff --git a/gnu/llvm/tools/lldb/include/lldb/Interpreter/Args.h b/gnu/llvm/tools/lldb/include/lldb/Interpreter/Args.h index 19d7ac41856..98046cd5954 100644 --- a/gnu/llvm/tools/lldb/include/lldb/Interpreter/Args.h +++ b/gnu/llvm/tools/lldb/include/lldb/Interpreter/Args.h @@ -86,7 +86,6 @@ public: Args(llvm::StringRef command = llvm::StringRef()); Args(const Args &rhs); - explicit Args(const StringList &list); Args &operator=(const Args &rhs); diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py index eb3b0bbf885..8c5fedf58ab 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py @@ -30,5 +30,8 @@ class SequenceFunctionsTestCase(unittest.TestCase): for element in random.sample(self.seq, 5): self.assertTrue(element in self.seq) + def getCategories(self): + return [] + if __name__ == '__main__': unittest.main() diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py index 275d54d2149..c600d8ed21b 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py @@ -14,9 +14,9 @@ class ConcurrentBreakpointsDelayedBreakpointOneWatchpoint( mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py index c9cc6db9600..169903816fa 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentCrashWithWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while another thread hits a watchpoint.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py index d99107b6e9b..4a58e7cf6d7 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py @@ -13,9 +13,9 @@ class ConcurrentCrashWithWatchpointBreakpointSignal(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py index 28c5c68d450..d5d4641bc16 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py @@ -13,9 +13,9 @@ class ConcurrentDelaySignalWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test a watchpoint and a (1 second delay) signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py index 2d7c984e0e1..9cbb40cb601 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentDelayWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test (1-second delay) watchpoint and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py index 0564c86dfcb..ccbeeb07d3a 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentDelayedCrashWithBreakpointWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py index 96b610f2b90..73c1704e7e5 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py @@ -17,7 +17,6 @@ class ConcurrentManyWatchpoints(ConcurrentEventsBase): "Skip this long running test") # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test 100 watchpoints from 100 threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py index b921ac04ccc..b9a7c5f568c 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py @@ -13,9 +13,9 @@ class ConcurrentNWatchNBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test with 5 watchpoint and breakpoint threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py index 2f3b858854b..12824534380 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py @@ -13,9 +13,9 @@ class ConcurrentSignalDelayWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test a (1 second delay) watchpoint and a signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py index ebb13d99fb3..56217e1e8c3 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py @@ -13,9 +13,9 @@ class ConcurrentSignalNWatchNBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test one signal thread with 5 watchpoint and breakpoint threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py index 0fbaf364045..00106289626 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py @@ -13,9 +13,9 @@ class ConcurrentSignalWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test a watchpoint and a signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py index 53da6658550..d7725002f2b 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentSignalWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test a signal/watchpoint/breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py index 687be17ddc5..f26a5dc6f84 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoBreakpointsOneWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a breakpoint and one watchpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py index 025d9116945..059e077be98 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointThreads(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py index 5e95531ae09..4b3c35ea8e6 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointsOneBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py index aa57e816bb5..ae6f64451ab 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointsOneDelayBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py index 31b583c1a65..78f2dbbc832 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py @@ -13,10 +13,9 @@ class ConcurrentTwoWatchpointsOneSignal(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @expectedFailureAll(bugnumber="llvm.org/pr35228", archs=["arm", "aarch64"]) - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one signal thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py index 241ea5b64a0..ffa6909129a 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test watchpoint and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py index 79a54b620e5..4c8b5b319ae 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py @@ -13,9 +13,9 @@ class ConcurrentWatchBreakDelay(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test watchpoint and a (1 second delay) breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py index 6a37abdbcbb..0d545b31230 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentWatchpointDelayWatchpointOneBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py index 67ac92b853c..56cd85da88d 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py @@ -13,9 +13,9 @@ class ConcurrentWatchpointWithDelayWatchpointThreads(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot + @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') - @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """ self.build(dictionary=self.getBuildFlags()) diff --git a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py index 5ef4249bd24..e77f2b7acec 100644 --- a/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py +++ b/gnu/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py @@ -53,7 +53,6 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.fail("failed to launch inferior: " + fail_reason) @debugserver_test - @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_start_inferior_debugserver(self): self.init_debugserver_test() self.build() @@ -81,7 +80,6 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.expect_gdbremote_sequence() @debugserver_test - @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_inferior_exit_0_debugserver(self): self.init_debugserver_test() self.build() @@ -114,7 +112,6 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.expect_gdbremote_sequence() @debugserver_test - @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_inferior_exit_42_debugserver(self): self.init_debugserver_test() self.build() diff --git a/gnu/llvm/tools/lldb/source/Host/macosx/Host.mm b/gnu/llvm/tools/lldb/source/Host/macosx/Host.mm index 7359815fdf7..75624ef21f4 100644 --- a/gnu/llvm/tools/lldb/source/Host/macosx/Host.mm +++ b/gnu/llvm/tools/lldb/source/Host/macosx/Host.mm @@ -20,7 +20,7 @@ #define __XPC_PRIVATE_H__ #include <xpc/xpc.h> -#define LaunchUsingXPCRightName "com.apple.lldb.RootDebuggingXPCService" +#define LaunchUsingXPCRightName "com.apple.dt.Xcode.RootDebuggingXPCService" // These XPC messaging keys are used for communication between Host.mm and the // XPC service. @@ -54,6 +54,7 @@ #include <sys/types.h> #include <unistd.h> +#include "lldb/Core/ArchSpec.h" #include "lldb/Core/Communication.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" @@ -62,7 +63,6 @@ #include "lldb/Host/ThreadLauncher.h" #include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" -#include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/CleanUp.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" diff --git a/gnu/llvm/tools/lldb/source/Interpreter/Args.cpp b/gnu/llvm/tools/lldb/source/Interpreter/Args.cpp index 07e5191f898..a23ba3094b2 100644 --- a/gnu/llvm/tools/lldb/source/Interpreter/Args.cpp +++ b/gnu/llvm/tools/lldb/source/Interpreter/Args.cpp @@ -185,11 +185,6 @@ Args::Args(llvm::StringRef command) { SetCommandString(command); } Args::Args(const Args &rhs) { *this = rhs; } -Args::Args(const StringList &list) : Args() { - for(size_t i = 0; i < list.GetSize(); ++i) - AppendArgument(list[i]); -} - Args &Args::operator=(const Args &rhs) { Clear(); diff --git a/gnu/llvm/tools/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm b/gnu/llvm/tools/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm index 7bd37683d2f..6a49b645c1e 100644 --- a/gnu/llvm/tools/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ b/gnu/llvm/tools/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -22,6 +22,7 @@ #include "llvm/ADT/StringRef.h" using namespace lldb_private; +using namespace lldb_utility; // CoreSimulator lives as part of Xcode, which means we can't really link // against it, so we dlopen() // it at runtime, and error out nicely if that fails diff --git a/gnu/llvm/tools/lldb/unittests/Interpreter/TestArgs.cpp b/gnu/llvm/tools/lldb/unittests/Interpreter/TestArgs.cpp index 2aaaab84e21..2aeed0f542b 100644 --- a/gnu/llvm/tools/lldb/unittests/Interpreter/TestArgs.cpp +++ b/gnu/llvm/tools/lldb/unittests/Interpreter/TestArgs.cpp @@ -10,7 +10,6 @@ #include "gtest/gtest.h" #include "lldb/Interpreter/Args.h" -#include "lldb/Utility/StringList.h" #include <limits> #include <sstream> @@ -118,16 +117,6 @@ TEST(ArgsTest, TestArgv) { EXPECT_EQ(nullptr, args.GetArgumentVector()[5]); } -TEST(ArgsTest, StringListConstructor) { - StringList list; - list << "foo" << "bar" << "baz"; - Args args(list); - ASSERT_EQ(3u, args.GetArgumentCount()); - EXPECT_EQ("foo", args[0].ref); - EXPECT_EQ("bar", args[1].ref); - EXPECT_EQ("baz", args[2].ref); -} - TEST(ArgsTest, GetQuotedCommandString) { Args args; const char *str = "process launch -o stdout.txt -- \"a b c\""; diff --git a/gnu/llvm/tools/lldb/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp b/gnu/llvm/tools/lldb/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp index ab28cb637d8..d7caf4281d5 100644 --- a/gnu/llvm/tools/lldb/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp +++ b/gnu/llvm/tools/lldb/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp @@ -17,9 +17,9 @@ #include "lldb/Core/Address.h" #include "lldb/Core/AddressRange.h" +#include "lldb/Core/ArchSpec.h" #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/UnwindAssembly.h" -#include "lldb/Utility/ArchSpec.h" #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h" #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" @@ -55,7 +55,7 @@ void TestArm64InstEmulation::TearDownTestCase() { } TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) { - ArchSpec arch("arm64-apple-ios10"); + ArchSpec arch("arm64-apple-ios10", nullptr); UnwindAssemblyInstEmulation *engine = static_cast<UnwindAssemblyInstEmulation *>( UnwindAssemblyInstEmulation::CreateInstance(arch)); @@ -151,7 +151,7 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) { } TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) { - ArchSpec arch("arm64-apple-ios10"); + ArchSpec arch("arm64-apple-ios10", nullptr); UnwindAssemblyInstEmulation *engine = static_cast<UnwindAssemblyInstEmulation *>( UnwindAssemblyInstEmulation::CreateInstance(arch)); @@ -313,7 +313,7 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) { } TEST_F(TestArm64InstEmulation, TestFramelessThreeEpilogueFunction) { - ArchSpec arch("arm64-apple-ios10"); + ArchSpec arch("arm64-apple-ios10", nullptr); UnwindAssemblyInstEmulation *engine = static_cast<UnwindAssemblyInstEmulation *>( UnwindAssemblyInstEmulation::CreateInstance(arch)); @@ -408,7 +408,7 @@ TEST_F(TestArm64InstEmulation, TestFramelessThreeEpilogueFunction) { } TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) { - ArchSpec arch("arm64-apple-ios10"); + ArchSpec arch("arm64-apple-ios10", nullptr); UnwindAssemblyInstEmulation *engine = static_cast<UnwindAssemblyInstEmulation *>( UnwindAssemblyInstEmulation::CreateInstance(arch)); @@ -510,7 +510,7 @@ TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) { } TEST_F(TestArm64InstEmulation, TestRegisterDoubleSpills) { - ArchSpec arch("arm64-apple-ios10"); + ArchSpec arch("arm64-apple-ios10", nullptr); UnwindAssemblyInstEmulation *engine = static_cast<UnwindAssemblyInstEmulation *>( UnwindAssemblyInstEmulation::CreateInstance(arch)); diff --git a/gnu/llvm/tools/llvm-pdbutil/Diff.cpp b/gnu/llvm/tools/llvm-pdbutil/Diff.cpp index 286dc51c29b..aad4e1bf142 100644 --- a/gnu/llvm/tools/llvm-pdbutil/Diff.cpp +++ b/gnu/llvm/tools/llvm-pdbutil/Diff.cpp @@ -23,6 +23,7 @@ #include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" #include "llvm/DebugInfo/PDB/Native/RawConstants.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/FormatAdapters.h" #include "llvm/Support/FormatProviders.h" #include "llvm/Support/FormatVariadic.h" @@ -134,28 +135,29 @@ struct BinaryPathProvider { struct StreamPurposeProvider { explicit StreamPurposeProvider(uint32_t MaxLen) : MaxLen(MaxLen) {} - DiffResult compare(const StreamInfo &L, const StreamInfo &R) { - if (L.getPurpose() != R.getPurpose()) + DiffResult compare(const std::pair<StreamPurpose, std::string> &L, + const std::pair<StreamPurpose, std::string> &R) { + if (L.first != R.first) return DiffResult::DIFFERENT; - if (L.getPurpose() == StreamPurpose::ModuleStream) { + if (L.first == StreamPurpose::ModuleStream) { BinaryPathProvider PathProvider(MaxLen); - return PathProvider.compare(L.getShortName(), R.getShortName()); + return PathProvider.compare(L.second, R.second); } - return (L.getShortName() == R.getShortName()) ? DiffResult::IDENTICAL - : DiffResult::DIFFERENT; + return (L.second == R.second) ? DiffResult::IDENTICAL + : DiffResult::DIFFERENT; } - std::string format(const StreamInfo &P, bool Right) { - if (P.getPurpose() == StreamPurpose::Other || - P.getPurpose() == StreamPurpose::Symbols) - return truncateStringBack(P.getShortName(), MaxLen); - if (P.getPurpose() == StreamPurpose::NamedStream) - return truncateQuotedNameBack("Named Stream", P.getShortName(), MaxLen); + std::string format(const std::pair<StreamPurpose, std::string> &P, + bool Right) { + if (P.first == StreamPurpose::Other) + return truncateStringBack(P.second, MaxLen); + if (P.first == StreamPurpose::NamedStream) + return truncateQuotedNameBack("Named Stream", P.second, MaxLen); - assert(P.getPurpose() == StreamPurpose::ModuleStream); + assert(P.first == StreamPurpose::ModuleStream); uint32_t ExtraChars = strlen("Module \"\""); BinaryPathProvider PathProvider(MaxLen - ExtraChars); - std::string Result = PathProvider.format(P.getShortName(), Right); + std::string Result = PathProvider.format(P.second, Right); return formatv("Module \"{0}\"", Result); } @@ -254,8 +256,8 @@ Error DiffStyle::diffStreamDirectory() { truncateStringFront(File1.getFilePath(), 18), truncateStringFront(File2.getFilePath(), 18)); - SmallVector<StreamInfo, 32> P; - SmallVector<StreamInfo, 32> Q; + SmallVector<std::pair<StreamPurpose, std::string>, 32> P; + SmallVector<std::pair<StreamPurpose, std::string>, 32> Q; discoverStreamPurposes(File1, P); discoverStreamPurposes(File2, Q); D.print("Stream Count", File1.getNumStreams(), File2.getNumStreams()); @@ -423,82 +425,45 @@ Error DiffStyle::diffInfoStream() { return Error::success(); } -typedef std::pair<uint32_t, DbiModuleDescriptor> IndexedModuleDescriptor; -typedef std::vector<IndexedModuleDescriptor> IndexedModuleDescriptorList; - -static IndexedModuleDescriptorList +static std::vector<std::pair<uint32_t, DbiModuleDescriptor>> getModuleDescriptors(const DbiModuleList &ML) { - IndexedModuleDescriptorList List; + std::vector<std::pair<uint32_t, DbiModuleDescriptor>> List; List.reserve(ML.getModuleCount()); for (uint32_t I = 0; I < ML.getModuleCount(); ++I) List.emplace_back(I, ML.getModuleDescriptor(I)); return List; } -static IndexedModuleDescriptorList::iterator -findOverrideEquivalentModule(uint32_t Modi, - IndexedModuleDescriptorList &OtherList) { - auto &EqMap = opts::diff::Equivalences; - - auto Iter = EqMap.find(Modi); - if (Iter == EqMap.end()) - return OtherList.end(); - - uint32_t EqValue = Iter->second; - - return llvm::find_if(OtherList, - [EqValue](const IndexedModuleDescriptor &Desc) { - return Desc.first == EqValue; - }); -} - -static IndexedModuleDescriptorList::iterator -findEquivalentModule(const IndexedModuleDescriptor &Item, - IndexedModuleDescriptorList &OtherList, bool ItemIsRight) { - - if (!ItemIsRight) { - uint32_t Modi = Item.first; - auto OverrideIter = findOverrideEquivalentModule(Modi, OtherList); - if (OverrideIter != OtherList.end()) - return OverrideIter; - } - - BinaryPathProvider PathProvider(28); - - auto Iter = OtherList.begin(); - auto End = OtherList.end(); - for (; Iter != End; ++Iter) { - const IndexedModuleDescriptor *Left = &Item; - const IndexedModuleDescriptor *Right = &*Iter; - if (ItemIsRight) - std::swap(Left, Right); - DiffResult Result = PathProvider.compare(Left->second.getModuleName(), - Right->second.getModuleName()); - if (Result == DiffResult::EQUIVALENT || Result == DiffResult::IDENTICAL) - return Iter; - } - return OtherList.end(); -} - -static void diffOneModule(DiffPrinter &D, const IndexedModuleDescriptor &Item, - IndexedModuleDescriptorList &Other, - bool ItemIsRight) { +static void +diffOneModule(DiffPrinter &D, + const std::pair<uint32_t, DbiModuleDescriptor> Item, + std::vector<std::pair<uint32_t, DbiModuleDescriptor>> &Other, + bool ItemIsRight) { StreamPurposeProvider HeaderProvider(70); - StreamInfo Info = StreamInfo::createModuleStream( - Item.second.getModuleName(), Item.second.getModuleStreamIndex(), - Item.first); - D.printFullRow(HeaderProvider.format(Info, ItemIsRight)); + std::pair<StreamPurpose, std::string> Header; + Header.first = StreamPurpose::ModuleStream; + Header.second = Item.second.getModuleName(); + D.printFullRow(HeaderProvider.format(Header, ItemIsRight)); const auto *L = &Item; - auto Iter = findEquivalentModule(Item, Other, ItemIsRight); + BinaryPathProvider PathProvider(28); + auto Iter = llvm::find_if( + Other, [&PathProvider, ItemIsRight, + L](const std::pair<uint32_t, DbiModuleDescriptor> &Other) { + const auto *Left = L; + const auto *Right = &Other; + if (ItemIsRight) + std::swap(Left, Right); + DiffResult Result = PathProvider.compare(Left->second.getModuleName(), + Right->second.getModuleName()); + return Result == DiffResult::EQUIVALENT || + Result == DiffResult::IDENTICAL; + }); if (Iter == Other.end()) { // We didn't find this module at all on the other side. Just print one row // and continue. - if (ItemIsRight) - D.print<ModiProvider>("- Modi", None, Item.first); - else - D.print<ModiProvider>("- Modi", Item.first, None); + D.print<ModiProvider>("- Modi", Item.first, None); return; } @@ -507,7 +472,6 @@ static void diffOneModule(DiffPrinter &D, const IndexedModuleDescriptor &Item, if (ItemIsRight) std::swap(L, R); - BinaryPathProvider PathProvider(28); D.print<ModiProvider>("- Modi", L->first, R->first); D.print<BinaryPathProvider>("- Obj File Name", L->second.getObjFileName(), R->second.getObjFileName(), PathProvider); diff --git a/gnu/llvm/tools/llvm-xray/xray-color-helper.cc b/gnu/llvm/tools/llvm-xray/xray-color-helper.cc index 61314d3c766..7b6a73a5552 100644 --- a/gnu/llvm/tools/llvm-xray/xray-color-helper.cc +++ b/gnu/llvm/tools/llvm-xray/xray-color-helper.cc @@ -10,6 +10,8 @@ // A class to get a color from a specified gradient. // //===----------------------------------------------------------------------===// +#include <algorithm> +#include <iostream> #include "xray-color-helper.h" #include "llvm/Support/FormatVariadic.h" diff --git a/gnu/llvm/tools/llvm-xray/xray-graph.cc b/gnu/llvm/tools/llvm-xray/xray-graph.cc index feb676331f8..685c24cb918 100644 --- a/gnu/llvm/tools/llvm-xray/xray-graph.cc +++ b/gnu/llvm/tools/llvm-xray/xray-graph.cc @@ -11,12 +11,19 @@ // the trace. // //===----------------------------------------------------------------------===// +#include <algorithm> +#include <cassert> +#include <cmath> +#include <system_error> +#include <utility> #include "xray-graph.h" #include "xray-registry.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/XRay/InstrumentationMap.h" #include "llvm/XRay/Trace.h" +#include "llvm/XRay/YAMLXRayRecord.h" using namespace llvm; using namespace llvm::xray; @@ -201,15 +208,13 @@ Error GraphRenderer::accountRecord(const XRayRecord &Record) { auto &ThreadStack = PerThreadFunctionStack[Record.TId]; switch (Record.Type) { - case RecordTypes::ENTER: - case RecordTypes::ENTER_ARG: { + case RecordTypes::ENTER: { if (Record.FuncId != 0 && G.count(Record.FuncId) == 0) G[Record.FuncId].SymbolName = FuncIdHelper.SymbolOrNumber(Record.FuncId); ThreadStack.push_back({Record.FuncId, Record.TSC}); break; } - case RecordTypes::EXIT: - case RecordTypes::TAIL_EXIT: { + case RecordTypes::EXIT: { // FIXME: Refactor this and the account subcommand to reduce code // duplication if (ThreadStack.size() == 0 || ThreadStack.back().FuncId != Record.FuncId) { diff --git a/gnu/llvm/utils/docker/debian8/build/Dockerfile b/gnu/llvm/utils/docker/debian8/build/Dockerfile index 5c5ed674496..13a11a73be6 100644 --- a/gnu/llvm/utils/docker/debian8/build/Dockerfile +++ b/gnu/llvm/utils/docker/debian8/build/Dockerfile @@ -18,30 +18,18 @@ RUN grep deb /etc/apt/sources.list | \ # Install compiler, python and subversion. RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates gnupg \ - build-essential python wget subversion ninja-build && \ + apt-get install -y --no-install-recommends build-essential python2.7 wget \ + subversion ninja-build && \ rm -rf /var/lib/apt/lists/* -# Import public key required for verifying signature of cmake download. -RUN gpg --keyserver hkp://pgp.mit.edu --recv 0x2D2CEF1034921684 - -# Download, verify and install cmake version that can compile clang into /usr/local. +# Install cmake version that can compile clang into /usr/local. # (Version in debian8 repos is is too old) -RUN mkdir /tmp/cmake-install && cd /tmp/cmake-install && \ - wget "https://cmake.org/files/v3.7/cmake-3.7.2-SHA-256.txt.asc" && \ - wget "https://cmake.org/files/v3.7/cmake-3.7.2-SHA-256.txt" && \ - gpg --verify cmake-3.7.2-SHA-256.txt.asc cmake-3.7.2-SHA-256.txt && \ - wget "https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" && \ - ( grep "cmake-3.7.2-Linux-x86_64.tar.gz" cmake-3.7.2-SHA-256.txt | \ - sha256sum -c - ) && \ - tar xzf cmake-3.7.2-Linux-x86_64.tar.gz -C /usr/local --strip-components=1 && \ - cd / && rm -rf /tmp/cmake-install - -ADD checksums /tmp/checksums -ADD scripts /tmp/scripts +RUN wget -O - "https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" | \ + tar xzf - -C /usr/local --strip-components=1 # Arguments passed to build_install_clang.sh. ARG buildscript_args # Run the build. Results of the build will be available as /tmp/clang.tar.gz. -RUN /tmp/scripts/build_install_llvm.sh ${buildscript_args} +ADD scripts/build_install_llvm.sh /tmp +RUN /tmp/build_install_llvm.sh ${buildscript_args} diff --git a/gnu/llvm/utils/docker/debian8/release/Dockerfile b/gnu/llvm/utils/docker/debian8/release/Dockerfile index 3a44a7d4116..d0214b9c67a 100644 --- a/gnu/llvm/utils/docker/debian8/release/Dockerfile +++ b/gnu/llvm/utils/docker/debian8/release/Dockerfile @@ -12,10 +12,10 @@ FROM launcher.gcr.io/google/debian8:latest LABEL maintainer "LLVM Developers" -# Install packages for minimal useful image. +# Install packages for minimal usefull image. RUN apt-get update && \ apt-get install -y --no-install-recommends libstdc++-4.9-dev binutils && \ rm -rf /var/lib/apt/lists/* # Unpack clang installation into this image. -ADD clang.tar.gz /usr/local/ +ADD clang.tar.gz / diff --git a/gnu/llvm/utils/docker/example/build/Dockerfile b/gnu/llvm/utils/docker/example/build/Dockerfile index be077f59f48..597ccfeb4f2 100644 --- a/gnu/llvm/utils/docker/example/build/Dockerfile +++ b/gnu/llvm/utils/docker/example/build/Dockerfile @@ -18,11 +18,9 @@ LABEL maintainer "Maintainer <maintainer@email>" # FIXME: Install llvm/clang build dependencies. Including compiler to # build stage1, cmake, subversion, ninja, etc. -ADD checksums /tmp/checksums -ADD scripts /tmp/scripts - -# Arguments passed to build_install_clang.sh. +# Arguments to pass to build_install_clang.sh. ARG buildscript_args # Run the build. Results of the build will be available as /tmp/clang.tar.gz. -RUN /tmp/scripts/build_install_llvm.sh ${buildscript_args} +ADD scripts/build_install_llvm.sh /tmp +RUN /tmp/build_install_llvm.sh ${buildscript_args} diff --git a/gnu/llvm/utils/docker/example/release/Dockerfile b/gnu/llvm/utils/docker/example/release/Dockerfile index b088ad885ac..953d81fc995 100644 --- a/gnu/llvm/utils/docker/example/release/Dockerfile +++ b/gnu/llvm/utils/docker/example/release/Dockerfile @@ -17,8 +17,8 @@ FROM ubuntu LABEL maintainer "Maintainer <maintainer@email>" # FIXME: Install all packages you want to have in your release container. -# A minimal useful installation must include libstdc++ and binutils. +# A minimal usefull installation must include libstdc++ and binutils. # Unpack clang installation into this container. # It is copied to this directory by build_docker_image.sh script. -ADD clang.tar.gz /usr/local/ +ADD clang.tar.gz / diff --git a/gnu/llvm/utils/docker/nvidia-cuda/build/Dockerfile b/gnu/llvm/utils/docker/nvidia-cuda/build/Dockerfile index cd353a2578b..619b80cbb61 100644 --- a/gnu/llvm/utils/docker/nvidia-cuda/build/Dockerfile +++ b/gnu/llvm/utils/docker/nvidia-cuda/build/Dockerfile @@ -17,15 +17,9 @@ ARG buildscript_args # Install llvm build dependencies. RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates cmake python \ - subversion ninja-build && \ + apt-get install -y --no-install-recommends cmake python2.7 subversion ninja-build && \ rm -rf /var/lib/apt/lists/* -ADD checksums /tmp/checksums -ADD scripts /tmp/scripts - -# Arguments passed to build_install_clang.sh. -ARG buildscript_args - # Run the build. Results of the build will be available as /tmp/clang.tar.gz. -RUN /tmp/scripts/build_install_llvm.sh ${buildscript_args} +ADD scripts/build_install_llvm.sh /tmp +RUN /tmp/build_install_llvm.sh ${buildscript_args} diff --git a/gnu/llvm/utils/docker/nvidia-cuda/release/Dockerfile b/gnu/llvm/utils/docker/nvidia-cuda/release/Dockerfile index a30d7d7e91e..b9bcae15978 100644 --- a/gnu/llvm/utils/docker/nvidia-cuda/release/Dockerfile +++ b/gnu/llvm/utils/docker/nvidia-cuda/release/Dockerfile @@ -18,6 +18,6 @@ FROM nvidia/cuda:8.0-devel LABEL maintainer "LLVM Developers" # Unpack clang installation into this container. -ADD clang.tar.gz /usr/local/ +ADD clang.tar.gz / # C++ standard library and binutils are already included in the base package. |