[Lldb-commits] [lldb] r285710 - Fix RHEL 6 build with missing cerrno and some other Include What You Use warnings.

2016-11-01 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Tue Nov  1 12:11:10 2016
New Revision: 285710

URL: http://llvm.org/viewvc/llvm-project?rev=285710=rev
Log:
Fix RHEL 6 build with missing cerrno and some other Include What You Use 
warnings.

Differential revision: https://reviews.llvm.org/D26171

Modified:
lldb/trunk/source/Host/posix/MainLoopPosix.cpp

Modified: lldb/trunk/source/Host/posix/MainLoopPosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/MainLoopPosix.cpp?rev=285710=285709=285710=diff
==
--- lldb/trunk/source/Host/posix/MainLoopPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/MainLoopPosix.cpp Tue Nov  1 12:11:10 2016
@@ -8,10 +8,13 @@
 
//===--===//
 
 #include "lldb/Host/posix/MainLoopPosix.h"
-
-#include 
-
 #include "lldb/Core/Error.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace lldb;
 using namespace lldb_private;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D26171: [LLDB] Fix RHEL 6 build and some Include What You Use warnings

2016-10-31 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added reviewers: labath, zturner.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

Build problem happens because of errno.


Repository:
  rL LLVM

https://reviews.llvm.org/D26171

Files:
  lldb-svn.src/source/Host/posix/MainLoopPosix.cpp


Index: lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
===
--- lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
+++ lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
@@ -8,11 +8,14 @@
 
//===--===//
 
 #include "lldb/Host/posix/MainLoopPosix.h"
-
+#include "lldb/Core/Error.h"
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
 
-#include "lldb/Core/Error.h"
-
 using namespace lldb;
 using namespace lldb_private;
 


Index: lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
===
--- lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
+++ lldb-svn.src/source/Host/posix/MainLoopPosix.cpp
@@ -8,11 +8,14 @@
 //===--===//
 
 #include "lldb/Host/posix/MainLoopPosix.h"
-
+#include "lldb/Core/Error.h"
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
 
-#include "lldb/Core/Error.h"
-
 using namespace lldb;
 using namespace lldb_private;
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25733: Add data formatter for libstdc++ tuple

2016-10-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Headers orders is still not correct.


Repository:
  rL LLVM

https://reviews.llvm.org/D25733



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr

2016-10-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Headers orders is still not correct.


https://reviews.llvm.org/D25734



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr

2016-10-18 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

There are same problems with formatting as in https://reviews.llvm.org/D25726. 
Also test case main() has wrong indentation.


https://reviews.llvm.org/D25734



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25733: Add data formatter for libstdc++ tuple

2016-10-18 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

There are same problems with formatting as in https://reviews.llvm.org/D25726. 
Also test case main() has wrong indentation.


https://reviews.llvm.org/D25733



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D24124: [LLDB][MIPS] Fix register read/write for 32 bit big endian system

2016-10-04 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Looks like patch was not committed. Please rebase with trunk and run 
Clang-format.


https://reviews.llvm.org/D24124



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D24549: [LLDB][MIPS] Skip some test case which were causing LLDB to go into infinite loop

2016-10-04 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D24549



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25247: Make LLDB -Werror clean under clang

2016-10-04 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added inline comments.


> Platform.h:16
>  #include 
>  #include 
> +#include 

This is application header. Should be in quotes. Same below.

https://reviews.llvm.org/D25247



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6127: Fix code formatting in lldbtest.py introduced with r220583.

2016-09-28 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL221467.


https://reviews.llvm.org/D6127



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D10167: Fix TestJoinAfterBreak test on Windows

2016-09-27 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL238787.


https://reviews.llvm.org/D10167



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D10216: Initial diff for FreeBSD kernel debugging support

2016-09-27 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed. Need to be rebased and format with 
Clang-format.


https://reviews.llvm.org/D10216



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13154: [MIPS] Use Address::GetAddressClass() instead of elf flags to decide address space of an address

2016-09-26 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


Repository:
  rL LLVM

https://reviews.llvm.org/D13154



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2016-09-26 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D13350



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13578: Allow generic arm ArchSpec to merge with specific arm ArchSpec; allow Cortex M0-7's to always force thumb mode

2016-09-26 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL265377.


Repository:
  rL LLVM

https://reviews.llvm.org/D13578



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14136: Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging

2016-09-26 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL251540.


https://reviews.llvm.org/D14136



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D17635: Continue after process exit

2016-09-26 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D17635



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D21032: Eliminate differences in lldbinline-generated Makefiles and ensure they're regenerated every time

2016-09-22 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Appear to be reverted in r272062.


Repository:
  rL LLVM

https://reviews.llvm.org/D21032



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D21152: Hunt for unused memory properly when dealing with processes that can tell us about memory mappings

2016-09-22 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was part of r272301.


Repository:
  rL LLVM

https://reviews.llvm.org/D21152



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12363: Read module list from mini dump

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r246302.


https://reviews.llvm.org/D12363



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6042: Fix junk content handling within GDBRemoteCommunication::CheckForPacket.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r220983.


https://reviews.llvm.org/D6042



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6105: Redirect stdin, stdout and stderr to /dev/null when launching LLGS process.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r221324.


https://reviews.llvm.org/D6105



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6158: Fix error handling in NativeProcessLinux::AttachToInferior

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r221647.


https://reviews.llvm.org/D6158



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6204: Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle leakage to a forked child process.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r222004.


https://reviews.llvm.org/D6204



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6490: Use timeout when reading debugserver's port from a named pipe.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r223251.


https://reviews.llvm.org/D6490



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6740: Make DynamicLoaderPOSIXDYLD::DidAttach to deduce a target executable by pid if no executable hasn't been assigned to a target so far.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r225332.


https://reviews.llvm.org/D6740



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6743: No need to call SetErrorToErrno when pipe2 succeeds.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r224652.


https://reviews.llvm.org/D6743



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6941: Fix XCode build on OSX - add OptionValueChar.cpp

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r225733.


https://reviews.llvm.org/D6941



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D6954: Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r225849.


https://reviews.llvm.org/D6954



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D7115: Make OSX test run firewall friendly.

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r226856.


https://reviews.llvm.org/D7115



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12966: Renderscript plugin support for aarch64

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r248003.


Repository:
  rL LLVM

https://reviews.llvm.org/D12966



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14920: [LLDB][MIPS] Provide actual number of watchpoints supported

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed. Please rebase with trunk and run 
Clang-format.


Repository:
  rL LLVM

https://reviews.llvm.org/D14920



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16234: Implement missing GoASTContext methods

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r257926.


Repository:
  rL LLVM

https://reviews.llvm.org/D16234



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16284: Fix Makefile build

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r259081.


https://reviews.llvm.org/D16284



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16695: Update LLDB Windows buildbot to use MSVC 2015 and Python 3.5

2016-09-21 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r259246.


https://reviews.llvm.org/D16695



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24694: [LLDB] Fix Clang initialization and Clang-tidy modernize-use-nullptr warnings

2016-09-20 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added inline comments.


Comment at: source/Plugins/Process/Utility/RegisterInfos_x86_64.h:12
@@ -12,1 +11,3 @@
+#include 
+#include 
 

labath wrote:
> It's not a "C" include, if it's cstddef now. :) If you could you also move 
> the headers to the end of the include list as well, it would be super great 
> as that is the new style now.
Will do this in commit. I assume that headers sets comments are obsolete now 
too. LLVM/Clang doesn't use them.


Repository:
  rL LLVM

https://reviews.llvm.org/D24694



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D8494: Fix lld command on Windows for many tests

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r233416.


https://reviews.llvm.org/D8494



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D8937: Add logging plugin for Winodows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r234607.


https://reviews.llvm.org/D8937



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D9753: Enable debugging of multithreaded programs on Windows.

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r237392.


https://reviews.llvm.org/D9753



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D9535: Don't attempt dsym tests on Windows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r236620.


https://reviews.llvm.org/D9535



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D10103: Fix inferior's i/o connections to its console window on Windows 7

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r238629.


https://reviews.llvm.org/D10103



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13679: Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r250188.


https://reviews.llvm.org/D13679



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15723: Allow test decorators to use lists (and not_in(list)) for arches

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r256283.


https://reviews.llvm.org/D15723



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D17152: Improve ReadRegister for RegisterContextWindowsx86

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r260559.


https://reviews.llvm.org/D17152



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15582: Improve error handling for `f s #`

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r256251. Please specify Differential revision in commit message.


https://reviews.llvm.org/D15582



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15723: Allow test decorators to use lists (and not_in(list)) for arches

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Committed in r256283. Please specify Differential revision in commit message.


https://reviews.llvm.org/D15723



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16477: Make all x86 target builds on MSVC use the amd64_x86 toolchain

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r258738.


https://reviews.llvm.org/D16477



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D17521: Update website for building and testing on Windows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r261795.


https://reviews.llvm.org/D17521



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D23952: Remove unused frame_zero_id local variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23952



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D23948: Remove unused variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23948



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D23950: Remove unused local variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23950



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22831: [LLDB] Documentation for SBAddress class

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Please rebase from trunk and run Clang-format.


Repository:
  rL LLVM

https://reviews.llvm.org/D22831



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D24694: [LLDB] Fix Clang initialization and Clang-tidy modernize-use-nullptr warnings

2016-09-16 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added reviewers: labath, zturner.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

Looks like RegisterContextNetBSD_x86_64.cpp should use RegisterInfos_x86_64.h 
as much as possible, but I think will be good idea if platform maintainer will 
take care about this.


Repository:
  rL LLVM

https://reviews.llvm.org/D24694

Files:
  source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
  source/Plugins/Process/Utility/RegisterInfos_i386.h
  source/Plugins/Process/Utility/RegisterInfos_x86_64.h

Index: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
===
--- source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
+++ source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
@@ -1,15 +1,16 @@
-//===-- RegisterContextNetBSD_x86_64.cpp --*- C++ -*-===//
+//===-- RegisterContextNetBSD_x86_64.cpp *- C++ -*-===//
 //
 // The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
 //
-//===-===//
+//===--===//
 
+#include 
 #include 
-#include 
 
+#include "llvm/ADT/Triple.h"
 #include "llvm/Support/Compiler.h"
 
 #include "RegisterContextNetBSD_x86_64.h"
@@ -89,10 +90,10 @@
LLVM_EXTENSION offsetof(XSAVE, ymmh[0]) + (32 * reg_index))
 
 // Number of bytes needed to represent a FPR.
-#define FPR_SIZE(reg) sizeof(((FXSAVE *)NULL)->reg)
+#define FPR_SIZE(reg) sizeof(((FXSAVE *)nullptr)->reg)
 
 // Number of bytes needed to represent the i'th FP register.
-#define FP_SIZE sizeof(((MMSReg *)NULL)->bytes)
+#define FP_SIZE sizeof(((MMSReg *)nullptr)->bytes)
 
 // Number of bytes needed to represent an XMM register.
 #define XMM_SIZE sizeof(XMMReg)
@@ -105,101 +106,106 @@
 // Note that the size and offset will be updated by platform-specific classes.
 #define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)   \
   {\
-#reg, alt, sizeof(((GPR *) NULL)->reg),\
+#reg, alt, sizeof(((GPR *)nullptr)->reg),  \
   GPR_OFFSET(reg), eEncodingUint, eFormatHex,  \
  {kind1, kind2, kind3, kind4,  \
   lldb_##reg##_x86_64 },   \
-  NULL, NULL   \
+  nullptr, nullptr, nullptr, 0 \
   }
 
 #define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4)  \
   {\
-#name, NULL, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, eFormatHex,\
+#name, nullptr, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, eFormatHex, \
{kind1, kind2, kind3, kind4,\
 lldb_##name##_x86_64 },\
-NULL, NULL \
+nullptr, nullptr, nullptr, 0   \
   }
 
 #define DEFINE_FP_ST(reg, i)   \
   {\
-#reg #i, NULL, FP_SIZE,\
+#reg #i, nullptr, FP_SIZE, \
 LLVM_EXTENSION FPR_OFFSET( \
 stmm[i]), eEncodingVector, eFormatVectorOfUInt8,   \
 {dwarf_st##i##_x86_64, dwarf_st##i##_x86_64, LLDB_INVALID_REGNUM,  \
  LLDB_INVALID_REGNUM, lldb_st##i##_x86_64 },   \
- NULL, NULL\
+ nullptr, nullptr, nullptr, 0  \
   }
 
 #define DEFINE_FP_MM(reg, i)   \
   {\
-#reg #i, NULL, sizeof(uint64_t),   \
+#reg #i, nullptr, sizeof(uint64_t),\
   LLVM_EXTENSION FPR_OFFSET(   \
   stmm[i]), eEncodingUint, eFormatHex, \
   {dwarf_mm##i##_x86_64, dwarf_mm##i##_x86_64, \

Re: [Lldb-commits] [PATCH] D24251: LLDB: API for Permission of object file's sections

2016-09-07 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added inline comments.


Comment at: source/API/SBSection.cpp:257
@@ +256,3 @@
+SectionSP section_sp(GetSP());
+if (section_sp.get())
+return section_sp->GetPermissions();

You don't need to use get(), because smart pointers have 
http://en.cppreference.com/w/cpp/memory/shared_ptr/operator_bool. Will be good 
idea to remove it in other conditions in this file.


https://reviews.llvm.org/D24251



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24251: LLDB: API for Permission of object file's sections

2016-09-06 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Please rebase code on trunk and run Clang-format.


https://reviews.llvm.org/D24251



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D23881: cmake: Add local module directory to search path for standalone build

2016-08-25 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

I think will be better to use LLVM_MAIN_SRC_DIR.


https://reviews.llvm.org/D23881



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)

2016-07-14 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Sorry, forgot to add "[revision] in commit summary".


https://reviews.llvm.org/D22284



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)

2016-07-14 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r275482.

Please mention URL of Differential revision to close it automatically after 
commit.


https://reviews.llvm.org/D22284



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22322: [LLDB] Fixes for standalone build

2016-07-14 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko updated this revision to Diff 64000.
Eugene.Zelenko added a comment.

Improved description, but in generic terms, since two files are needed.


Repository:
  rL LLVM

https://reviews.llvm.org/D22322

Files:
  cmake/modules/LLDBStandalone.cmake

Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -58,6 +58,7 @@
   set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
   set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
+  set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to 
LLVM build tree CMake files")
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 
@@ -85,6 +86,7 @@
 
   include(AddLLVM)
   include(HandleLLVMOptions)
+  include(CheckAtomic)
 
   if (PYTHON_EXECUTABLE STREQUAL "")
 set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)


Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -58,6 +58,7 @@
   set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
   set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
+  set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files")
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 
@@ -85,6 +86,7 @@
 
   include(AddLLVM)
   include(HandleLLVMOptions)
+  include(CheckAtomic)
 
   if (PYTHON_EXECUTABLE STREQUAL "")
 set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D22322: [LLDB] Fixes for standalone build

2016-07-13 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added reviewers: labath, zturner, nitesh.jain.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

This patch include two fixes:

* include CheckAtomic to set HAVE_CXX_ATOMICS64_WITHOUT_LIB properly 
(introduced in r274121)
* hint Clang CMake files for LLVM CMake files location (inctroduced in ~ 
r274176)

Repository:
  rL LLVM

http://reviews.llvm.org/D22322

Files:
  cmake/modules/LLDBStandalone.cmake

Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -58,6 +58,7 @@
   set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
   set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
+  set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to 
LLVM build tree")
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 
@@ -85,6 +86,7 @@
 
   include(AddLLVM)
   include(HandleLLVMOptions)
+  include(CheckAtomic)
 
   if (PYTHON_EXECUTABLE STREQUAL "")
 set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)


Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -58,6 +58,7 @@
   set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
   set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
+  set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree")
   set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
   set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
 
@@ -85,6 +86,7 @@
 
   include(AddLLVM)
   include(HandleLLVMOptions)
+  include(CheckAtomic)
 
   if (PYTHON_EXECUTABLE STREQUAL "")
 set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)

2016-07-12 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.


Comment at: include/lldb/Host/Editline.h:289
@@ +288,3 @@
+unsigned char
+EndOrAddLineCommand (int ch);
+

Will be good idea to not add space between name and arguments list in new code. 
Same for other places.


Repository:
  rL LLVM

http://reviews.llvm.org/D22284



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.

2016-07-07 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

> Then we need to introduce a 64 bit atomic check in 
> cmake/modules/LLDBStandalone.cmake. What do you think?

> 

> Thanks


I think this should be right solution.


Repository:
  rL LLVM

http://reviews.llvm.org/D20464



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.

2016-07-04 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

As fas as I could judge from log, you built LLDB with LLVM/Clang. But problem 
happens when it's necessary to build LLDB separately from LLVM/Clang 
(standalone build).


Repository:
  rL LLVM

http://reviews.llvm.org/D20464



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.

2016-06-30 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

I see HAVE_CXX_ATOMICS64_WITHOUT_LIB messages during LLVM Cmake run, but I 
don't see such message during LLDB CMake run.

Is this value is supposed to be read form LLVM CMake cache?


Repository:
  rL LLVM

http://reviews.llvm.org/D20464



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.

2016-06-29 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

This change broke standalone build. Looks like check  which should set 
HAVE_CXX_ATOMICS64_WITHOUT_LIB was not performed.

I build LLDB with LLVM STL which doesn't have libatomic.


Repository:
  rL LLVM

http://reviews.llvm.org/D20464



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D20344: [LLDB] Fix standalone LLDB build when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON

2016-05-18 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko updated this revision to Diff 57648.
Eugene.Zelenko added a comment.

Add comments per Pavel suggestion.


Repository:
  rL LLVM

http://reviews.llvm.org/D20344

Files:
  cmake/modules/LLDBStandalone.cmake

Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8.12.2)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 
'install' target." OFF)
 
   # Rely on llvm-config.
@@ -96,7 +100,10 @@
 
   # Import CMake library targets from LLVM and Clang.
   
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
-  
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built 
together.
+  if (EXISTS 
"${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
 
@@ -104,6 +111,17 @@
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+  # Next three include directories are needed when llvm-config is located in 
build directory.
+  # LLVM and Cland are assumed to be built together
+  if (EXISTS "${LLVM_OBJ_ROOT}/include")
+include_directories("${LLVM_OBJ_ROOT}/include")
+  endif()
+  if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+  endif()
+  if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include")
+include_directories("${LLVM_OBJ_ROOT}/tools/clang/include")
+  endif()
   link_directories("${LLVM_LIBRARY_DIR}")
 
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)


Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8.12.2)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
   # Rely on llvm-config.
@@ -96,7 +100,10 @@
 
   # Import CMake library targets from LLVM and Clang.
   include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
-  include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built together.
+  if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
 
@@ -104,6 +111,17 @@
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+  # Next three include directories are needed when llvm-config is located in build directory.
+  # LLVM and Cland are assumed to be built together
+  if (EXISTS "${LLVM_OBJ_ROOT}/include")
+include_directories("${LLVM_OBJ_ROOT}/include")
+  endif()
+  if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+  endif()
+  if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include")
+include_directories("${LLVM_OBJ_ROOT}/tools/clang/include")
+  endif()
   link_directories("${LLVM_LIBRARY_DIR}")
 
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D20344: [LLDB] Fix standalone LLDB build when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON

2016-05-17 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added reviewers: labath, krytarowski, zturner.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

Patch also includes fix for CMake 2.8.12.2, see D18018.

Repository:
  rL LLVM

http://reviews.llvm.org/D20344

Files:
  cmake/modules/LLDBStandalone.cmake

Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8.12.2)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 
'install' target." OFF)
 
   # Rely on llvm-config.
@@ -96,7 +100,9 @@
 
   # Import CMake library targets from LLVM and Clang.
   
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
-  
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  if (EXISTS 
"${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
 
@@ -104,6 +110,15 @@
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+  if (EXISTS "${LLVM_OBJ_ROOT}/include")
+include_directories("${LLVM_OBJ_ROOT}/include")
+  endif()
+  if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+  endif()
+  if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include")
+include_directories("${LLVM_OBJ_ROOT}/tools/clang/include")
+  endif()
   link_directories("${LLVM_LIBRARY_DIR}")
 
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)


Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8.12.2)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
   # Rely on llvm-config.
@@ -96,7 +100,9 @@
 
   # Import CMake library targets from LLVM and Clang.
   include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
-  include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
 
@@ -104,6 +110,15 @@
 
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+  if (EXISTS "${LLVM_OBJ_ROOT}/include")
+include_directories("${LLVM_OBJ_ROOT}/include")
+  endif()
+  if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include")
+  endif()
+  if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include")
+include_directories("${LLVM_OBJ_ROOT}/tools/clang/include")
+  endif()
   link_directories("${LLVM_LIBRARY_DIR}")
 
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D18018: [LLDB] Fix standalone build with CMake 2.8.12.2, broken after adding SymbolFile PDB plugin

2016-05-17 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko abandoned this revision.
Eugene.Zelenko added a comment.

Obsoleted by http://reviews.llvm.org/D20344.


Repository:
  rL LLVM

http://reviews.llvm.org/D18018



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15067: Add CMake bits necessary for standalone build

2016-05-12 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

In http://reviews.llvm.org/D15067#428146, @krytarowski wrote:

> @Eugene.Zelenko do you agree with this patch and what @labath wrote?


If CMake works that way, it's what I need :-)


Repository:
  rL LLVM

http://reviews.llvm.org/D15067



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r268750 - Fix standalone build on RHEL6.

2016-05-06 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri May  6 12:03:09 2016
New Revision: 268750

URL: http://llvm.org/viewvc/llvm-project?rev=268750=rev
Log:
Fix standalone build on RHEL6.

Differential revision: http://reviews.llvm.org/D19991

Modified:
lldb/trunk/cmake/LLDBDependencies.cmake

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=268750=268749=268750=diff
==
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Fri May  6 12:03:09 2016
@@ -195,6 +195,7 @@ set(LLVM_LINK_COMPONENTS
   runtimedyld
   option
   support
+  coverage
   )
 
 if ( NOT LLDB_DISABLE_PYTHON )


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19991: [LLDB] Fix standalone build on RHEL6

2016-05-06 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Undefined symbols were used in clang::CodeGen::CoverageMappingGen.


Repository:
  rL LLVM

http://reviews.llvm.org/D19991



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r263312 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-11 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Mar 11 18:31:13 2016
New Revision: 263312

URL: http://llvm.org/viewvc/llvm-project?rev=263312=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/include/lldb/Core/SearchFilter.h
lldb/trunk/source/Core/RegisterValue.cpp
lldb/trunk/source/Core/RegularExpression.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/SearchFilter.cpp

Modified: lldb/trunk/include/lldb/Core/SearchFilter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SearchFilter.h?rev=263312=263311=263312=diff
==
--- lldb/trunk/include/lldb/Core/SearchFilter.h (original)
+++ lldb/trunk/include/lldb/Core/SearchFilter.h Fri Mar 11 18:31:13 2016
@@ -94,7 +94,6 @@ public:
 class SearchFilter
 {
 public:
-
 //--
 /// The basic constructor takes a Target, which gives the space to search.
 ///
@@ -108,7 +107,7 @@ public:
 virtual
 ~SearchFilter ();
 
-const SearchFilter&
+SearchFilter&
 operator=(const SearchFilter& rhs);
 
 //--
@@ -294,7 +293,6 @@ class SearchFilterByModule :
 public SearchFilter
 {
 public:
-
 //--
 /// The basic constructor takes a Target, which gives the space to search,
 /// and the module to restrict the search to.
@@ -312,7 +310,7 @@ public:
 
 ~SearchFilterByModule() override;
 
-const SearchFilterByModule&
+SearchFilterByModule&
 operator=(const SearchFilterByModule& rhs);
 
 bool
@@ -354,7 +352,6 @@ class SearchFilterByModuleList :
 public SearchFilter
 {
 public:
-
 //--
 /// The basic constructor takes a Target, which gives the space to search,
 /// and the module list to restrict the search to.
@@ -372,7 +369,7 @@ public:
 
 ~SearchFilterByModuleList() override;
 
-const SearchFilterByModuleList&
+SearchFilterByModuleList&
 operator=(const SearchFilterByModuleList& rhs);
 
 bool
@@ -414,7 +411,6 @@ class SearchFilterByModuleListAndCU :
 public SearchFilterByModuleList
 {
 public:
-
 //--
 /// The basic constructor takes a Target, which gives the space to search,
 /// and the module list to restrict the search to.
@@ -433,7 +429,7 @@ public:
 
 ~SearchFilterByModuleListAndCU() override;
 
-const SearchFilterByModuleListAndCU&
+SearchFilterByModuleListAndCU&
 operator=(const SearchFilterByModuleListAndCU& rhs);
 
 bool

Modified: lldb/trunk/source/Core/RegisterValue.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegisterValue.cpp?rev=263312=263311=263312=diff
==
--- lldb/trunk/source/Core/RegisterValue.cpp (original)
+++ lldb/trunk/source/Core/RegisterValue.cpp Fri Mar 11 18:31:13 2016
@@ -1,4 +1,4 @@
-//===-- RegisterValue.cpp *- C++ 
-*-===//
+//===-- RegisterValue.cpp ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -11,7 +11,11 @@
 
 // C Includes
 // C++ Includes
+#include 
+
 // Other libraries and framework includes
+#include "llvm/ADT/StringRef.h"
+
 // Project includes
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/Error.h"
@@ -24,7 +28,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-
 bool
 RegisterValue::Dump (Stream *s, 
  const RegisterInfo *reg_info, 
@@ -98,14 +101,12 @@ RegisterValue::Dump (Stream *s,
 return false;
 }
 
-
 bool
 RegisterValue::GetData (DataExtractor ) const
 {
 return data.SetData(GetBytes(), GetByteSize(), GetByteOrder()) > 0;
 }
 
-
 uint32_t
 RegisterValue::GetAsMemoryData (const RegisterInfo *reg_info,
 void *dst,
@@ -113,7 +114,7 @@ RegisterValue::GetAsMemoryData (const Re
 lldb::ByteOrder dst_byte_order,
 Error ) const
 {
-if (reg_info == NULL)
+if (reg_info == nullptr)
 {
 error.SetErrorString ("invalid register info argument.");
 return 0;
@@ -163,7 +164,7 @@ RegisterValue::SetFromMemoryData (const
   lldb::ByteOrder src_byte_order,
   Error )
 {
-if (reg_info == NULL)
+if (reg_info == nullptr)
 {
 error.SetErrorString ("invalid register info argument.");
 return 0;
@@ -405,8 +406,6 @@ RegisterValue::SetValueFromData (const R
 return error;
 }
 
-#include "llvm/ADT/StringRef.h"
-#include 
 static inline void 

[Lldb-commits] [lldb] r263289 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-11 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Mar 11 14:20:38 2016
New Revision: 263289

URL: http://llvm.org/viewvc/llvm-project?rev=263289=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Core/ModuleList.cpp

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=263289=263288=263289=diff
==
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Fri Mar 11 14:20:38 2016
@@ -38,8 +38,14 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/ThreadPlan.h"
-
-
+#ifndef LLDB_DISABLE_CURSES
+#include "lldb/Core/ValueObject.h"
+#include "lldb/Symbol/VariableList.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Target/StackFrame.h"
+#endif
 
 using namespace lldb;
 using namespace lldb_private;
@@ -67,7 +73,7 @@ IOHandler::IOHandler (Debugger 
 m_popped (false),
 m_flags (flags),
 m_type (type),
-m_user_data (NULL),
+m_user_data(nullptr),
 m_done (false),
 m_active (false)
 {
@@ -83,49 +89,37 @@ IOHandler::~IOHandler() = default;
 int
 IOHandler::GetInputFD()
 {
-if (m_input_sp)
-return m_input_sp->GetFile().GetDescriptor();
-return -1;
+return (m_input_sp ? m_input_sp->GetFile().GetDescriptor() : -1);
 }
 
 int
 IOHandler::GetOutputFD()
 {
-if (m_output_sp)
-return m_output_sp->GetFile().GetDescriptor();
-return -1;
+return (m_output_sp ? m_output_sp->GetFile().GetDescriptor() : -1);
 }
 
 int
 IOHandler::GetErrorFD()
 {
-if (m_error_sp)
-return m_error_sp->GetFile().GetDescriptor();
-return -1;
+return (m_error_sp ? m_error_sp->GetFile().GetDescriptor() : -1);
 }
 
 FILE *
 IOHandler::GetInputFILE()
 {
-if (m_input_sp)
-return m_input_sp->GetFile().GetStream();
-return NULL;
+return (m_input_sp ? m_input_sp->GetFile().GetStream() : nullptr);
 }
 
 FILE *
 IOHandler::GetOutputFILE()
 {
-if (m_output_sp)
-return m_output_sp->GetFile().GetStream();
-return NULL;
+return (m_output_sp ? m_output_sp->GetFile().GetStream() : nullptr);
 }
 
 FILE *
 IOHandler::GetErrorFILE()
 {
-if (m_error_sp)
-return m_error_sp->GetFile().GetStream();
-return NULL;
+return (m_error_sp ? m_error_sp->GetFile().GetStream() : nullptr);
 }
 
 StreamFileSP &
@@ -186,9 +180,9 @@ IOHandlerConfirm::IOHandlerConfirm (Debu
 bool default_response) :
 IOHandlerEditline(debugger,
   IOHandler::Type::Confirm,
-  NULL, // NULL editline_name means no history 
loaded/saved
-  NULL, // No prompt
-  NULL, // No continuation prompt
+  nullptr,  // nullptr editline_name means no history 
loaded/saved
+  nullptr,  // No prompt
+  nullptr,  // No continuation prompt
   false,// Multi-line
   false,// Don't colorize the prompt (i.e. the confirm 
message.)
   0,
@@ -204,7 +198,6 @@ IOHandlerConfirm::IOHandlerConfirm (Debu
 prompt_stream.Printf(": [y/N] ");
 
 SetPrompt (prompt_stream.GetString().c_str());
-
 }
 
 IOHandlerConfirm::~IOHandlerConfirm() = default;
@@ -304,14 +297,14 @@ IOHandlerDelegate::IOHandlerComplete (IO
 --word_start;
 while (word_start > current_line && !isspace(*word_start))
 --word_start;
-CommandCompletions::InvokeCommonCompletionCallbacks 
(io_handler.GetDebugger().GetCommandInterpreter(),
- 
CommandCompletions::eVariablePathCompletion,
- word_start,
- 
skip_first_n_matches,
- max_matches,
- NULL,
- word_complete,
- matches);
+
CommandCompletions::InvokeCommonCompletionCallbacks(io_handler.GetDebugger().GetCommandInterpreter(),
+
CommandCompletions::eVariablePathCompletion,
+word_start,
+
skip_first_n_matches,
+  

[Lldb-commits] [lldb] r263174 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-10 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Mar 10 17:57:12 2016
New Revision: 263174

URL: http://llvm.org/viewvc/llvm-project?rev=263174=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/source/Core/ConstString.cpp
lldb/trunk/source/Core/Error.cpp
lldb/trunk/source/Core/Event.cpp
lldb/trunk/source/Core/FormatEntity.cpp
lldb/trunk/source/Core/Listener.cpp
lldb/trunk/source/Core/Log.cpp

Modified: lldb/trunk/source/Core/ConstString.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=263174=263173=263174=diff
==
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Thu Mar 10 17:57:12 2016
@@ -6,14 +6,21 @@
 // License. See LICENSE.TXT for details.
 //
 
//===--===//
+
 #include "lldb/Core/ConstString.h"
-#include "lldb/Core/Stream.h"
+
+// C Includes
+// C++ Includes
+#include 
+#include 
+
+// Other libraries and framework includes
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/RWMutex.h"
 
-#include 
-#include 
+// Project includes
+#include "lldb/Core/Stream.h"
 
 using namespace lldb_private;
 
@@ -34,7 +41,7 @@ public:
 size_t
 GetConstCStringLength (const char *ccstr) const
 {
-if (ccstr)
+if (ccstr != nullptr)
 {
 const uint8_t h = hash (llvm::StringRef(ccstr));
 llvm::sys::SmartScopedReader 
rlock(m_string_pools[h].m_mutex);
@@ -47,19 +54,19 @@ public:
 StringPoolValueType
 GetMangledCounterpart (const char *ccstr) const
 {
-if (ccstr)
+if (ccstr != nullptr)
 {
 const uint8_t h = hash (llvm::StringRef(ccstr));
 llvm::sys::SmartScopedReader 
rlock(m_string_pools[h].m_mutex);
 return GetStringMapEntryFromKeyData (ccstr).getValue();
 }
-return 0;
+return nullptr;
 }
 
 bool
 SetMangledCounterparts (const char *key_ccstr, const char *value_ccstr)
 {
-if (key_ccstr && value_ccstr)
+if (key_ccstr != nullptr && value_ccstr != nullptr)
 {
 {
 const uint8_t h = hash (llvm::StringRef(key_ccstr));
@@ -79,7 +86,7 @@ public:
 const char *
 GetConstCString (const char *cstr)
 {
-if (cstr)
+if (cstr != nullptr)
 return GetConstCStringWithLength (cstr, strlen (cstr));
 return nullptr;
 }
@@ -87,7 +94,7 @@ public:
 const char *
 GetConstCStringWithLength (const char *cstr, size_t cstr_len)
 {
-if (cstr)
+if (cstr != nullptr)
 return GetConstCStringWithStringRef(llvm::StringRef(cstr, 
cstr_len));
 return nullptr;
 }
@@ -116,7 +123,7 @@ public:
 const char *
 GetConstCStringAndSetMangledCounterPart (const char *demangled_cstr, const 
char *mangled_ccstr)
 {
-if (demangled_cstr)
+if (demangled_cstr != nullptr)
 {
 const char *demangled_ccstr = nullptr;
 
@@ -150,7 +157,7 @@ public:
 const char *
 GetConstTrimmedCStringWithLength (const char *cstr, size_t cstr_len)
 {
-if (cstr)
+if (cstr != nullptr)
 {
 const size_t trimmed_len = std::min (strlen (cstr), 
cstr_len);
 return GetConstCStringWithLength (cstr, trimmed_len);
@@ -253,7 +260,7 @@ Stream&
 lldb_private::operator << (Stream& s, const ConstString& str)
 {
 const char *cstr = str.GetCString();
-if (cstr)
+if (cstr != nullptr)
 s << cstr;
 
 return s;
@@ -306,18 +313,18 @@ ConstString::Compare(const ConstString &
 }
 
 if (lhs_cstr)
-return +1;  // LHS isn't NULL but RHS is
+return +1;  // LHS isn't nullptr but RHS is
 else
-return -1;  // LHS is NULL but RHS isn't
+return -1;  // LHS is nullptr but RHS isn't
 }
 
 void
 ConstString::Dump(Stream *s, const char *fail_value) const
 {
-if (s)
+if (s != nullptr)
 {
 const char *cstr = AsCString (fail_value);
-if (cstr)
+if (cstr != nullptr)
 s->PutCString (cstr);
 }
 }
@@ -327,7 +334,7 @@ ConstString::DumpDebug(Stream *s) const
 {
 const char *cstr = GetCString ();
 size_t cstr_len = GetLength();
-// Only print the parens if we have a non-NULL string
+// Only print the parens if we have a non-nullptr string
 const char *parens = cstr ? "\"" : "";
 s->Printf("%*p: ConstString, string = %s%s%s, length = %" PRIu64,
   static_cast(sizeof(void*) * 2),

Modified: lldb/trunk/source/Core/Error.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Error.cpp?rev=263174=263173=263174=diff
==
--- 

Re: [Lldb-commits] [PATCH] D18018: [LLDB] Fix standalone build with CMake 2.8.12.2, broken after adding SymbolFile PDB plugin

2016-03-09 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

Probably not since in case of non-standalone build LLVM make file should be 
enough and LLDBStandalone.cmake will be not executed.


Repository:
  rL LLVM

http://reviews.llvm.org/D18018



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D18018: [LLDB] Fix standalone build with CMake 2.8.12.2, broken after adding SymbolFile PDB plugin

2016-03-09 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a comment.

My guess is that project() or cmake_minimum_required() resets policy value set 
in upper level make file.


Repository:
  rL LLVM

http://reviews.llvm.org/D18018



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D18018: [LLDB] Fix standalone build with CMake 2.8.12.2, broken after adding SymbolFile PDB plugin

2016-03-09 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added a reviewer: zturner.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

LLVM and Clang CMakeLists.txt set this policy explicitly.

Repository:
  rL LLVM

http://reviews.llvm.org/D18018

Files:
  cmake/modules/LLDBStandalone.cmake

Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 
'install' target." OFF)
 
   set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH


Index: cmake/modules/LLDBStandalone.cmake
===
--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -4,6 +4,10 @@
   project(lldb)
   cmake_minimum_required(VERSION 2.8)
 
+  if (POLICY CMP0022)
+cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+  endif()
+
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
   set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r262570 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-02 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Mar  2 18:51:40 2016
New Revision: 262570

URL: http://llvm.org/viewvc/llvm-project?rev=262570=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/source/Core/DataBufferHeap.cpp
lldb/trunk/source/Core/DataBufferMemoryMap.cpp
lldb/trunk/source/Core/Disassembler.cpp
lldb/trunk/source/Core/DynamicLoader.cpp
lldb/trunk/source/Core/EmulateInstruction.cpp
lldb/trunk/source/Core/FileSpecList.cpp

Modified: lldb/trunk/source/Core/DataBufferHeap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferHeap.cpp?rev=262570=262569=262570=diff
==
--- lldb/trunk/source/Core/DataBufferHeap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferHeap.cpp Wed Mar  2 18:51:40 2016
@@ -9,6 +9,11 @@
 
 #include "lldb/Core/DataBufferHeap.h"
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+
 using namespace lldb_private;
 
 //--
@@ -44,32 +49,26 @@ DataBufferHeap::DataBufferHeap (const vo
 // Virtual destructor since this class inherits from a pure virtual
 // base class.
 //--
-DataBufferHeap::~DataBufferHeap ()
-{
-}
+DataBufferHeap::~DataBufferHeap() = default;
 
 //--
-// Return a pointer to the bytes owned by this object, or NULL if
+// Return a pointer to the bytes owned by this object, or nullptr if
 // the object contains no bytes.
 //--
 uint8_t *
 DataBufferHeap::GetBytes ()
 {
-if (m_data.empty())
-return NULL;
-return _data[0];
+return (m_data.empty() ? nullptr : m_data.data());
 }
 
 //--
-// Return a const pointer to the bytes owned by this object, or NULL
+// Return a const pointer to the bytes owned by this object, or nullptr
 // if the object contains no bytes.
 //--
 const uint8_t *
 DataBufferHeap::GetBytes () const
 {
-if (m_data.empty())
-return NULL;
-return _data[0];
+return (m_data.empty() ? nullptr : m_data.data());
 }
 
 //--
@@ -81,7 +80,6 @@ DataBufferHeap::GetByteSize () const
 return m_data.size();
 }
 
-
 //--
 // Sets the number of bytes that this object should be able to
 // contain. This can be used prior to copying data into the buffer.

Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=262570=262569=262570=diff
==
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Wed Mar  2 18:51:40 2016
@@ -7,10 +7,8 @@
 //
 
//===--===//
 
-
-#include 
+// C Includes
 #include 
-#include 
 #include 
 #ifdef _WIN32
 #include "lldb/Host/windows/windows.h"
@@ -18,8 +16,14 @@
 #include 
 #endif
 
+// C++ Includes
+#include 
+#include 
+
+// Other libraries and framework includes
 #include "llvm/Support/MathExtras.h"
 
+// Project includes
 #include "lldb/Core/DataBufferMemoryMap.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Host/File.h"
@@ -34,9 +38,9 @@ using namespace lldb_private;
 // Default Constructor
 //--
 DataBufferMemoryMap::DataBufferMemoryMap() :
-m_mmap_addr(NULL),
+m_mmap_addr(nullptr),
 m_mmap_size(0),
-m_data(NULL),
+m_data(nullptr),
 m_size(0)
 {
 }
@@ -51,7 +55,7 @@ DataBufferMemoryMap::~DataBufferMemoryMa
 }
 
 //--
-// Return a pointer to the bytes owned by this object, or NULL if
+// Return a pointer to the bytes owned by this object, or nullptr if
 // the object contains no bytes.
 //--
 uint8_t *
@@ -61,7 +65,7 @@ DataBufferMemoryMap::GetBytes()
 }
 
 //--
-// Return a const pointer to the bytes owned by this object, or NULL
+// Return a const pointer to the bytes owned by this object, or nullptr
 // if the object contains no bytes.
 //--
 const uint8_t *
@@ -86,7 +90,7 @@ DataBufferMemoryMap::GetByteSize() const
 void
 DataBufferMemoryMap::Clear()
 {
-if (m_mmap_addr != NULL)

[Lldb-commits] [lldb] r262450 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-01 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Tue Mar  1 20:18:18 2016
New Revision: 262450

URL: http://llvm.org/viewvc/llvm-project?rev=262450=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Core/Debugger.cpp

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=262450=262449=262450=diff
==
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Tue Mar  1 20:18:18 2016
@@ -7,17 +7,17 @@
 //
 
//===--===//
 
-#include 
-#include 
-
+// C Includes
+// C++ Includes
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
-#include 
-
-#include "clang/AST/ASTContext.h"
 
+// Other libraries and framework includes
 #include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/ArrayRef.h"
@@ -25,6 +25,9 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/MD5.h"
 
+#include "clang/AST/ASTContext.h"
+
+// Project includes
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/DataBuffer.h"
@@ -125,15 +128,13 @@ ReadSwapInt64(const void* ptr)
 }
 
 #define NON_PRINTABLE_CHAR '.'
-//--
-// Default constructor.
-//--
+
 DataExtractor::DataExtractor () :
-m_start (NULL),
-m_end   (NULL),
+m_start(nullptr),
+m_end(nullptr),
 m_byte_order(endian::InlHostByteOrder()),
-m_addr_size (sizeof(void *)),
-m_data_sp   (),
+m_addr_size(sizeof(void *)),
+m_data_sp(),
 m_target_byte_size(1)
 {
 }
@@ -163,11 +164,11 @@ DataExtractor::DataExtractor (const void
 // this data.
 //--
 DataExtractor::DataExtractor (const DataBufferSP& data_sp, ByteOrder endian, 
uint32_t addr_size, uint32_t target_byte_size/*=1*/) :
-m_start (NULL),
-m_end   (NULL),
+m_start(nullptr),
+m_end(nullptr),
 m_byte_order(endian),
-m_addr_size (addr_size),
-m_data_sp   (),
+m_addr_size(addr_size),
+m_data_sp(),
 m_target_byte_size(target_byte_size)
 {
 #ifdef LLDB_CONFIGURATION_DEBUG
@@ -184,8 +185,8 @@ DataExtractor::DataExtractor (const Data
 // swap and address size settings are copied from "data".
 //--
 DataExtractor::DataExtractor (const DataExtractor& data, offset_t offset, 
offset_t length, uint32_t target_byte_size/*=1*/) :
-m_start(NULL),
-m_end(NULL),
+m_start(nullptr),
+m_end(nullptr),
 m_byte_order(data.m_byte_order),
 m_addr_size(data.m_addr_size),
 m_data_sp(),
@@ -233,12 +234,7 @@ DataExtractor::operator= (const DataExtr
 return *this;
 }
 
-//--
-// Destructor
-//--
-DataExtractor::~DataExtractor ()
-{
-}
+DataExtractor::~DataExtractor() = default;
 
 //--
 // Clears the object contents back to a default invalid state, and
@@ -248,8 +244,8 @@ DataExtractor::~DataExtractor ()
 void
 DataExtractor::Clear ()
 {
-m_start = NULL;
-m_end = NULL;
+m_start = nullptr;
+m_end = nullptr;
 m_byte_order = endian::InlHostByteOrder();
 m_addr_size = sizeof(void *);
 m_data_sp.reset();
@@ -262,13 +258,13 @@ DataExtractor::Clear ()
 size_t
 DataExtractor::GetSharedDataOffset () const
 {
-if (m_start != NULL)
+if (m_start != nullptr)
 {
 const DataBuffer * data = m_data_sp.get();
-if (data != NULL)
+if (data != nullptr)
 {
 const uint8_t * data_bytes = data->GetBytes();
-if (data_bytes != NULL)
+if (data_bytes != nullptr)
 {
 assert(m_start >= data_bytes);
 return m_start - data_bytes;
@@ -293,10 +289,10 @@ DataExtractor::SetData (const void *byte
 {
 m_byte_order = endian;
 m_data_sp.reset();
-if (bytes == NULL || length == 0)
+if (bytes == nullptr || length == 0)
 {
-m_start = NULL;
-m_end = NULL;
+m_start = nullptr;
+m_end = nullptr;
 }
 else
 {
@@ -328,7 +324,7 @@ DataExtractor::SetData (const DataExtrac
 assert (m_addr_size == 4 || m_addr_size == 8);
 #endif
 // If "data" contains shared pointer to data, then we can use that
-if (data.m_data_sp.get())
+if (data.m_data_sp)
 {
 m_byte_order = data.m_byte_order;
 return SetData(data.m_data_sp, 

[Lldb-commits] [lldb] r262441 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

2016-03-01 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Tue Mar  1 19:09:03 2016
New Revision: 262441

URL: http://llvm.org/viewvc/llvm-project?rev=262441=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; 
other minor fixes.

Modified:
lldb/trunk/include/lldb/Core/Broadcaster.h
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/AddressResolverName.cpp
lldb/trunk/source/Core/ArchSpec.cpp
lldb/trunk/source/Core/Broadcaster.cpp
lldb/trunk/source/Core/Communication.cpp
lldb/trunk/source/Core/ConnectionSharedMemory.cpp
lldb/trunk/source/Core/DataEncoder.cpp

Modified: lldb/trunk/include/lldb/Core/Broadcaster.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Broadcaster.h?rev=262441=262440=262441=diff
==
--- lldb/trunk/include/lldb/Core/Broadcaster.h (original)
+++ lldb/trunk/include/lldb/Core/Broadcaster.h Tue Mar  1 19:09:03 2016
@@ -75,7 +75,7 @@ public:
 }
 
 bool operator< (const BroadcastEventSpec ) const;
-const BroadcastEventSpec = (const BroadcastEventSpec );
+BroadcastEventSpec =(const BroadcastEventSpec );
 
 private:
 ConstString m_broadcaster_class;
@@ -194,15 +194,11 @@ private:
 
 bool operator () (const event_listener_key input) const
 {
-if (input.second == m_listener)
-return true;
-else
-return false;
+return (input.second == m_listener);
 }
 
 private:
 const Listener *m_listener;
-
 };
 };
 
@@ -463,4 +459,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_Broadcaster_h_
+#endif // liblldb_Broadcaster_h_

Modified: lldb/trunk/source/Core/Address.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=262441=262440=262441=diff
==
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Tue Mar  1 19:09:03 2016
@@ -8,6 +8,13 @@
 
//===--===//
 
 #include "lldb/Core/Address.h"
+
+// C Includes
+// C++ Includes
+#include "llvm/ADT/Triple.h"
+
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Symbol/Block.h"
@@ -20,15 +27,13 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Symbol/SymbolVendor.h"
 
-#include "llvm/ADT/Triple.h"
-
 using namespace lldb;
 using namespace lldb_private;
 
 static size_t
 ReadBytes (ExecutionContextScope *exe_scope, const Address , void 
*dst, size_t dst_len)
 {
-if (exe_scope == NULL)
+if (exe_scope == nullptr)
 return 0;
 
 TargetSP target_sp (exe_scope->CalculateTarget());
@@ -46,7 +51,7 @@ GetByteOrderAndAddressSize (ExecutionCon
 {
 byte_order = eByteOrderInvalid;
 addr_size = 0;
-if (exe_scope == NULL)
+if (exe_scope == nullptr)
 return false;
 
 TargetSP target_sp (exe_scope->CalculateTarget());
@@ -72,7 +77,7 @@ static uint64_t
 ReadUIntMax64 (ExecutionContextScope *exe_scope, const Address , 
uint32_t byte_size, bool )
 {
 uint64_t uval64 = 0;
-if (exe_scope == NULL || byte_size > sizeof(uint64_t))
+if (exe_scope == nullptr || byte_size > sizeof(uint64_t))
 {
 success = false;
 return 0;
@@ -99,10 +104,9 @@ ReadUIntMax64 (ExecutionContextScope *ex
 static bool
 ReadAddress (ExecutionContextScope *exe_scope, const Address , 
uint32_t pointer_size, Address _so_addr)
 {
-if (exe_scope == NULL)
+if (exe_scope == nullptr)
 return false;
 
-
 bool success = false;
 addr_t deref_addr = ReadUIntMax64 (exe_scope, address, pointer_size, 
success);
 if (success)
@@ -140,7 +144,7 @@ ReadAddress (ExecutionContextScope *exe_
 static bool
 DumpUInt (ExecutionContextScope *exe_scope, const Address , uint32_t 
byte_size, Stream* strm)
 {
-if (exe_scope == NULL || byte_size == 0)
+if (exe_scope == nullptr || byte_size == 0)
 return 0;
 std::vector buf(byte_size, 0);
 
@@ -168,11 +172,10 @@ DumpUInt (ExecutionContextScope *exe_sco
 return false;
 }
 
-
 static size_t
 ReadCStringFromMemory (ExecutionContextScope *exe_scope, const Address 
, Stream *strm)
 {
-if (exe_scope == NULL)
+if (exe_scope == nullptr)
 return 0;
 const size_t k_buf_len = 256;
 char buf[k_buf_len+1];
@@ -334,7 +337,7 @@ Address::GetCallableLoadAddress (Target
 {
 ProcessSP processSP = target->GetProcessSP();
 Error error;
-if (processSP.get())
+if (processSP)
 {
 code_addr = processSP->ResolveIndirectFunction(this, error);
 if (!error.Success())
@@ -398,7 +401,7 @@ Address::SetOpcodeLoadAddress (lldb::add
 bool
 Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle 

[Lldb-commits] [lldb] r262281 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target/Process.cpp; other minor fixes.

2016-02-29 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Mon Feb 29 18:55:51 2016
New Revision: 262281

URL: http://llvm.org/viewvc/llvm-project?rev=262281=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in 
source/Target/Process.cpp; other minor fixes.

Modified:
lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=262281=262280=262281=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Mon Feb 29 18:55:51 2016
@@ -11,6 +11,7 @@
 // C++ Includes
 #include 
 #include 
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Target/Process.h"
@@ -113,17 +114,17 @@ public:
 static PropertyDefinition
 g_properties[] =
 {
-{ "disable-memory-cache" , OptionValue::eTypeBoolean, false, 
DISABLE_MEM_CACHE_DEFAULT, NULL, NULL, "Disable reading and caching of memory 
in fixed-size units." },
-{ "extra-startup-command", OptionValue::eTypeArray  , false, 
OptionValue::eTypeString, NULL, NULL, "A list containing extra commands 
understood by the particular process plugin used.  "
+{ "disable-memory-cache" , OptionValue::eTypeBoolean, false, 
DISABLE_MEM_CACHE_DEFAULT, nullptr, nullptr, "Disable reading and caching of 
memory in fixed-size units." },
+{ "extra-startup-command", OptionValue::eTypeArray  , false, 
OptionValue::eTypeString, nullptr, nullptr, "A list containing extra commands 
understood by the particular process plugin used.  "

"For instance, to turn on debugserver logging set this 
to \"QSetLogging:bitmask=LOG_DEFAULT;\"" },
-{ "ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, 
true, NULL, NULL, "If true, breakpoints will be ignored during expression 
evaluation." },
-{ "unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, true, 
NULL, NULL, "If true, errors in expression evaluation will unwind the stack 
back to the state before the call." },
-{ "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, NULL, 
NULL, "A path to a python OS plug-in module file that contains a 
OperatingSystemPlugIn class." },
-{ "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, 
NULL, NULL, "If true, stop when a shared library is loaded or unloaded." },
-{ "detach-keeps-stopped" , OptionValue::eTypeBoolean, true, false, NULL, 
NULL, "If true, detach will attempt to keep the process stopped." },
-{ "memory-cache-line-size" , OptionValue::eTypeUInt64, false, 512, NULL, 
NULL, "The memory cache line size" },
-{ "optimization-warnings" , OptionValue::eTypeBoolean, false, true, NULL, 
NULL, "If true, warn when stopped in code that is optimized where stepping and 
variable availability may not behave as expected." },
-{  NULL  , OptionValue::eTypeInvalid, false, 0, NULL, 
NULL, NULL  }
+{ "ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, 
true, nullptr, nullptr, "If true, breakpoints will be ignored during expression 
evaluation." },
+{ "unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, true, 
nullptr, nullptr, "If true, errors in expression evaluation will unwind the 
stack back to the state before the call." },
+{ "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, 
nullptr, nullptr, "A path to a python OS plug-in module file that contains a 
OperatingSystemPlugIn class." },
+{ "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, 
nullptr, nullptr, "If true, stop when a shared library is loaded or unloaded." 
},
+{ "detach-keeps-stopped" , OptionValue::eTypeBoolean, true, false, 
nullptr, nullptr, "If true, detach will attempt to keep the process stopped." },
+{ "memory-cache-line-size" , OptionValue::eTypeUInt64, false, 512, 
nullptr, nullptr, "The memory cache line size" },
+{ "optimization-warnings" , OptionValue::eTypeBoolean, false, true, 
nullptr, nullptr, "If true, warn when stopped in code that is optimized where 
stepping and variable availability may not behave as expected." },
+{  nullptr  , OptionValue::eTypeInvalid, false, 0, 
nullptr, nullptr, nullptr  }
 };
 
 enum {
@@ -139,10 +140,10 @@ enum {
 };
 
 ProcessProperties::ProcessProperties (lldb_private::Process *process) :
-Properties (),
-m_process (process) // Can be NULL for global ProcessProperties
+Properties(),
+m_process(process) // Can be nullptr for global ProcessProperties
 {
-if (process == NULL)
+if (process == nullptr)
 {
 // Global process properties, set them up one time
 m_collection_sp.reset (new 
ProcessOptionValueProperties(ConstString("process")));
@@ -173,14 +174,14 @@ bool
 

[Lldb-commits] [lldb] r262246 - Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other minor fixes.

2016-02-29 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Mon Feb 29 13:41:30 2016
New Revision: 262246

URL: http://llvm.org/viewvc/llvm-project?rev=262246=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other 
minor fixes.

Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=262246=262245=262246=diff
==
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp 
(original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Mon Feb 
29 13:41:30 2016
@@ -1,4 +1,4 @@
-//===-- CPlusPlusLanguage.cpp --*- C++ 
-*-===//
+//===-- CPlusPlusLanguage.cpp ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -9,9 +9,17 @@
 
 #include "CPlusPlusLanguage.h"
 
+// C Includes
+// C++ Includes
+#include 
+#include 
+#include 
+#include 
 
+// Other libraries and framework includes
 #include "llvm/ADT/StringRef.h"
 
+// Project includes
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegularExpression.h"
@@ -26,11 +34,6 @@
 #include "LibCxxAtomic.h"
 #include "LibStdcpp.h"
 
-#include 
-#include 
-#include 
-#include 
-
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::formatters;
@@ -56,10 +59,10 @@ CPlusPlusLanguage::GetPluginNameStatic()
 return g_name;
 }
 
-
 //--
 // PluginInterface protocol
 //--
+
 lldb_private::ConstString
 CPlusPlusLanguage::GetPluginName()
 {
@@ -75,6 +78,7 @@ CPlusPlusLanguage::GetPluginVersion()
 //--
 // Static Functions
 //--
+
 Language *
 CPlusPlusLanguage::CreateInstance (lldb::LanguageType language)
 {
@@ -320,10 +324,7 @@ CPlusPlusLanguage::IsCPPMangledName (con
 // this is a C++ mangled name, but we can put that off till there is 
actually more than one
 // we care about.
 
-if (name && name[0] == '_' && name[1] == 'Z')
-return true;
-else
-return false;
+return (name != nullptr && name[0] == '_' && name[1] == 'Z');
 }
 
 bool
@@ -345,7 +346,6 @@ class CPPRuntimeEquivalents
 public:
 CPPRuntimeEquivalents ()
 {
-
 m_impl.Append(ConstString("std::basic_string").AsCString(), 
ConstString("basic_string"));
 
 // these two (with a prefixed std::) occur when c++stdlib string class 
occurs as a template argument in some STL container
@@ -365,11 +365,10 @@ public:
 FindExactMatches (ConstString& type_name,
   std::vector& equivalents)
 {
-
 uint32_t count = 0;
 
 for (ImplData match = 
m_impl.FindFirstValueForName(type_name.AsCString());
- match != NULL;
+ match != nullptr;
  match = m_impl.FindNextValueForName(match))
 {
 equivalents.push_back(match->value);
@@ -388,7 +387,6 @@ public:
 FindPartialMatches (ConstString& type_name,
 std::vector& equivalents)
 {
-
 uint32_t count = 0;
 
 const char* type_name_cstr = type_name.AsCString();
@@ -407,11 +405,9 @@ public:
 }
 
 return count;
-
 }
 
 private:
-
 std::string& replace (std::string& target,
   std::string& pattern,
   std::string& with)
@@ -430,14 +426,13 @@ private:
 const char *matching_key,
 std::vector& equivalents)
 {
-
 std::string matching_key_str(matching_key);
 ConstString original_const(original);
 
 

[Lldb-commits] [lldb] r261936 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectThread.cpp; other minor fixes.

2016-02-25 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Feb 25 17:46:36 2016
New Revision: 261936

URL: http://llvm.org/viewvc/llvm-project?rev=261936=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in 
source/Commands/CommandObjectThread.cpp; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectThread.cpp

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=261936=261935=261936=diff
==
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Thu Feb 25 17:46:36 2016
@@ -37,11 +37,9 @@
 #include "lldb/Target/ThreadPlanStepRange.h"
 #include "lldb/Target/ThreadPlanStepInRange.h"
 
-
 using namespace lldb;
 using namespace lldb_private;
 
-
 //-
 // CommandObjectThreadBacktrace
 //-
@@ -58,7 +56,7 @@ public:
 {
 }
 
-~CommandObjectIterateOverThreads() override {}
+~CommandObjectIterateOverThreads() override = default;
 
 bool
 DoExecute (Args& command, CommandReturnObject ) override
@@ -112,7 +110,6 @@ public:
 result.SetStatus (eReturnStatusFailed);
 return false;
 }
-
 }
 
 for (uint32_t i = 0; i < num_args; i++)
@@ -128,7 +125,6 @@ public:
 }
 
 protected:
-
 // Override this to do whatever you need to do for one thread.
 //
 // If you return false, the iteration will stop, otherwise it will proceed.
@@ -141,7 +137,6 @@ protected:
 
 ReturnStatus m_success_return = eReturnStatusSuccessFinishResult;
 bool m_add_return = true;
-
 };
 
 //-
@@ -151,11 +146,9 @@ protected:
 class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads
 {
 public:
-
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options(interpreter)
 {
@@ -163,9 +156,7 @@ public:
 OptionParsingStarting ();
 }
 
-~CommandOptions () override
-{
-}
+~CommandOptions() override = default;
 
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override
@@ -206,7 +197,6 @@ public:
 default:
 error.SetErrorStringWithFormat("invalid short option 
character '%c'", short_option);
 break;
-
 }
 return error;
 }
@@ -236,22 +226,20 @@ public:
 };
 
 CommandObjectThreadBacktrace (CommandInterpreter ) :
-CommandObjectIterateOverThreads (interpreter,
- "thread backtrace",
- "Show the stack for one or more threads.  If no 
threads are specified, show the currently selected thread.  Use the 
thread-index \"all\" to see all threads.",
- NULL,
- eCommandRequiresProcess   |
- eCommandRequiresThread|
- eCommandTryTargetAPILock  |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused   ),
+CommandObjectIterateOverThreads(interpreter,
+"thread backtrace",
+"Show the stack for one or more 
threads.  If no threads are specified, show the currently selected thread.  Use 
the thread-index \"all\" to see all threads.",
+nullptr,
+eCommandRequiresProcess   |
+eCommandRequiresThread|
+eCommandTryTargetAPILock  |
+eCommandProcessMustBeLaunched |
+eCommandProcessMustBePaused   ),
 m_options(interpreter)
 {
 }
 
-~CommandObjectThreadBacktrace() override
-{
-}
+~CommandObjectThreadBacktrace() override = default;
 
 Options *
 GetOptions () override
@@ -317,10 +305,10 @@ protected:
 OptionDefinition
 CommandObjectThreadBacktrace::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 
NULL, 0, eArgTypeCount, "How many frames to display (-1 for all)"},
-{ LLDB_OPT_SET_1, false, "start", 's', OptionParser::eRequiredArgument, NULL, 
NULL, 0, eArgTypeFrameIndex, "Frame in which to start the backtrace"},
-{ LLDB_OPT_SET_1, false, "extended", 'e', OptionParser::eRequiredArgument, 

[Lldb-commits] [lldb] r261817 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectType.cpp; other minor fixes.

2016-02-24 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Feb 24 20:08:17 2016
New Revision: 261817

URL: http://llvm.org/viewvc/llvm-project?rev=261817=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in 
source/Commands/CommandObjectType.cpp; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=261817=261816=261817=diff
==
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Wed Feb 24 20:08:17 2016
@@ -1,4 +1,4 @@
-//===-- CommandObjectType.cpp --*- C++ -*-===//
+//===-- CommandObjectType.cpp ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -10,14 +10,14 @@
 #include "CommandObjectType.h"
 
 // C Includes
-
-#include 
-
 // C++ Includes
+#include 
 #include 
 
+// Other libraries and framework includes
 #include "llvm/ADT/StringRef.h"
 
+// Project includes
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/IOHandler.h"
@@ -43,20 +43,13 @@
 using namespace lldb;
 using namespace lldb_private;
 
-
 class ScriptAddOptions
 {
-
 public:
-
 TypeSummaryImpl::Flags m_flags;
-
 StringList m_target_types;
-
 bool m_regex;
-
 ConstString m_name;
-
 std::string m_category;
 
 ScriptAddOptions(const TypeSummaryImpl::Flags& flags,
@@ -71,20 +64,16 @@ public:
 }
 
 typedef std::shared_ptr SharedPointer;
-
 };
 
 class SynthAddOptions
 {
-
 public:
-
 bool m_skip_pointers;
 bool m_skip_references;
 bool m_cascade;
 bool m_regex;
 StringList m_target_types;
-
 std::string m_category;
 
 SynthAddOptions(bool sptr,
@@ -102,7 +91,6 @@ public:
 }
 
 typedef std::shared_ptr SharedPointer;
-
 };
 
 static bool
@@ -136,20 +124,17 @@ class CommandObjectTypeSummaryAdd :
 public CommandObjectParsed,
 public IOHandlerDelegateMultiline
 {
-
 private:
-
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options (interpreter)
 {
 }
-
-~CommandOptions () override {}
-
+
+~CommandOptions() override = default;
+
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override;
 
@@ -193,7 +178,6 @@ private:
 Execute_StringSummary (Args& command, CommandReturnObject );
 
 public:
-
 enum SummaryFormatType
 {
 eRegularSummary,
@@ -202,11 +186,9 @@ public:
 };
 
 CommandObjectTypeSummaryAdd (CommandInterpreter );
-
-~CommandObjectTypeSummaryAdd () override
-{
-}
-
+
+~CommandObjectTypeSummaryAdd() override = default;
+
 void
 IOHandlerActivated (IOHandler _handler) override
 {
@@ -222,8 +204,7 @@ public:
 output_sp->Flush();
 }
 }
-
-
+
 void
 IOHandlerInputComplete (IOHandler _handler, std::string ) override
 {
@@ -344,7 +325,7 @@ public:
 error_sp->Printf ("error: script interpreter missing, didn't add 
python command.\n");
 error_sp->Flush();
 }
-#endif // #ifndef LLDB_DISABLE_PYTHON
+#endif // LLDB_DISABLE_PYTHON
 io_handler.SetIsDone(true);
 }
 
@@ -353,11 +334,11 @@ public:
lldb::TypeSummaryImplSP entry,
SummaryFormatType type,
std::string category,
-   Error* error = NULL);
+   Error* error = nullptr);
+
 protected:
 bool
 DoExecute (Args& command, CommandReturnObject ) override;
-
 };
 
 static const char *g_synth_addreader_instructions =   "Enter your Python 
command(s). Type 'DONE' to end.\n"
@@ -374,20 +355,17 @@ class CommandObjectTypeSynthAdd :
 public CommandObjectParsed,
 public IOHandlerDelegateMultiline
 {
-
 private:
-
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options (interpreter)
 {
 }
-
-~CommandOptions () override {}
-
+
+~CommandOptions() override = default;
+
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override
 {
@@ -460,13 +438,9 @@ private:
 std::string m_class_name;
 bool m_input_python;
 std::string m_category;
-
 bool is_class_based;
-
 bool handwrite_python;
-
 bool m_regex;
-
 };
 
 CommandOptions m_options;
@@ -511,8 +485,7 @@ protected:
 output_sp->Flush();
 }
 }
-
-  

[Lldb-commits] [lldb] r261716 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.

2016-02-23 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Tue Feb 23 20:05:55 2016
New Revision: 261716

URL: http://llvm.org/viewvc/llvm-project?rev=261716=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some 
files in source/Commands; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp

Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=261716=261715=261716=diff
==
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Tue Feb 23 20:05:55 
2016
@@ -12,6 +12,8 @@
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
+#include "llvm/ADT/StringRef.h"
+
 // Project includes
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
@@ -20,7 +22,6 @@
 
 using namespace lldb;
 using namespace lldb_private;
-#include "llvm/ADT/StringRef.h"
 
 //-
 // CommandObjectSettingsSet
@@ -30,10 +31,10 @@ class CommandObjectSettingsSet : public
 {
 public:
 CommandObjectSettingsSet (CommandInterpreter ) :
-CommandObjectRaw (interpreter,
-  "settings set",
-  "Set or change the value of a single debugger 
setting variable.",
-  NULL),
+CommandObjectRaw(interpreter,
+ "settings set",
+ "Set or change the value of a single debugger setting 
variable.",
+ nullptr),
 m_options (interpreter)
 {
 CommandArgumentEntry arg1;
@@ -82,8 +83,7 @@ insert-before or insert-after."
 
 }
 
-
-~CommandObjectSettingsSet () override {}
+~CommandObjectSettingsSet() override = default;
 
 // Overrides base class's behavior where WantsCompletion = 
!WantsRawCommandString.
 bool
@@ -98,14 +98,13 @@ insert-before or insert-after."
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options (interpreter),
 m_global (false)
 {
 }
 
-~CommandOptions () override {}
+~CommandOptions() override = default;
 
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override
@@ -160,7 +159,7 @@ insert-before or insert-after."
 std::string completion_str (input.GetArgumentAtIndex (cursor_index), 
cursor_char_position);
 
 const size_t argc = input.GetArgumentCount();
-const char *arg = NULL;
+const char *arg = nullptr;
 int setting_var_idx;
 for (setting_var_idx = 1; setting_var_idx < static_cast(argc);
  ++setting_var_idx)
@@ -172,14 +171,14 @@ insert-before or insert-after."
 if (cursor_index == setting_var_idx)
 {
 // Attempting to complete setting variable name
-CommandCompletions::InvokeCommonCompletionCallbacks (m_interpreter,
- 
CommandCompletions::eSettingsNameCompletion,
- 
completion_str.c_str(),
- 
match_start_point,
- 
max_return_elements,
- NULL,
- word_complete,
- matches);
+CommandCompletions::InvokeCommonCompletionCallbacks(m_interpreter,
+
CommandCompletions::eSettingsNameCompletion,
+
completion_str.c_str(),
+
match_start_point,
+
max_return_elements,
+nullptr,
+word_complete,
+matches);
 }
 else
 {
@@ -231,7 +230,7 @@ protected:
 }
 
 const char *var_name = cmd_args.GetArgumentAtIndex (0);
-if ((var_name == NULL) || (var_name[0] == '\0'))
+if ((var_name == nullptr) || (var_name[0] == '\0'))
 {
 result.AppendError ("'settings set' command requires a valid 
variable name");
 

[Lldb-commits] [lldb] r261602 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.

2016-02-22 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Mon Feb 22 19:43:44 2016
New Revision: 261602

URL: http://llvm.org/viewvc/llvm-project?rev=261602=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some 
files in source/Commands; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp

Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=261602=261601=261602=diff
==
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Feb 22 19:43:44 2016
@@ -7,12 +7,11 @@
 //
 
//===--===//
 
-#include "CommandObjectProcess.h"
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+#include "CommandObjectProcess.h"
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Breakpoint/BreakpointSite.h"
@@ -46,8 +45,9 @@ public:
const char *new_process_action) :
 CommandObjectParsed (interpreter, name, help, syntax, flags),
 m_new_process_action (new_process_action) {}
-
-~CommandObjectProcessLaunchOrAttach () override {}
+
+~CommandObjectProcessLaunchOrAttach() override = default;
+
 protected:
 bool
 StopProcessIfNecessary (Process *process, StateType , 
CommandReturnObject )
@@ -81,7 +81,7 @@ protected:
 if (detach_error.Success())
 {
 result.SetStatus 
(eReturnStatusSuccessFinishResult);
-process = NULL;
+process = nullptr;
 }
 else
 {
@@ -95,7 +95,7 @@ protected:
 if (destroy_error.Success())
 {
 result.SetStatus 
(eReturnStatusSuccessFinishResult);
-process = NULL;
+process = nullptr;
 }
 else
 {
@@ -108,8 +108,10 @@ protected:
 }
 return result.Succeeded();
 }
+
 std::string m_new_process_action;
 };
+
 //-
 // CommandObjectProcessLaunch
 //-
@@ -117,14 +119,13 @@ protected:
 class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach
 {
 public:
-
 CommandObjectProcessLaunch (CommandInterpreter ) :
-CommandObjectProcessLaunchOrAttach (interpreter,
-"process launch",
-"Launch the executable in the 
debugger.",
-NULL,
-eCommandRequiresTarget,
-"restart"),
+CommandObjectProcessLaunchOrAttach(interpreter,
+   "process launch",
+   "Launch the executable in the 
debugger.",
+   nullptr,
+   eCommandRequiresTarget,
+   "restart"),
 m_options (interpreter)
 {
 CommandArgumentEntry arg;
@@ -141,10 +142,7 @@ public:
 m_arguments.push_back (arg);
 }
 
-
-~CommandObjectProcessLaunch () override
-{
-}
+~CommandObjectProcessLaunch() override = default;
 
 int
 HandleArgumentCompletion (Args ,
@@ -159,14 +157,14 @@ public:
 std::string completion_str (input.GetArgumentAtIndex(cursor_index));
 completion_str.erase (cursor_char_position);
 
-CommandCompletions::InvokeCommonCompletionCallbacks (m_interpreter, 
- 
CommandCompletions::eDiskFileCompletion,
- 
completion_str.c_str(),
- match_start_point,
- 
max_return_elements,
- NULL,
- word_complete,
- matches);
+CommandCompletions::InvokeCommonCompletionCallbacks(m_interpreter, 
+ 

Re: [Lldb-commits] [lldb] r261593 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectCommands.cpp; other minor fixes.

2016-02-22 Thread Eugene Zelenko via lldb-commits
On Mon, Feb 22, 2016 at 4:14 PM, Adrian McCarthy  wrote:
> It looks like this patch reorders the #includes in a way that seems contrary
> to general practice.  In particular, if foo.cpp has a header foo.h, then it
> should include foo.h before any other files.  This helps ensure that foo.h
> can stand alone and won't require clients to have to figure out what else
> must be included.
>
> http://llvm.org/docs/CodingStandards.html#include-style
>
> I know LLDB doesn't always follow LLVM guidelines, but this seems pretty
> common and intentional.

I try to follow headers section comments.

Eugene.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r261593 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectCommands.cpp; other minor fixes.

2016-02-22 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Mon Feb 22 17:46:47 2016
New Revision: 261593

URL: http://llvm.org/viewvc/llvm-project?rev=261593=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in 
source/Commands/CommandObjectCommands.cpp; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectCommands.cpp

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=261593=261592=261593=diff
==
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Feb 22 17:46:47 
2016
@@ -7,14 +7,13 @@
 //
 
//===--===//
 
-#include "CommandObjectCommands.h"
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 #include "llvm/ADT/StringRef.h"
 
 // Project includes
+#include "CommandObjectCommands.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/Core/StringList.h"
@@ -39,15 +38,15 @@ class CommandObjectCommandsHistory : pub
 {
 public:
 CommandObjectCommandsHistory(CommandInterpreter ) :
-CommandObjectParsed (interpreter,
- "command history",
- "Dump the history of commands in this session.",
- NULL),
+CommandObjectParsed(interpreter,
+"command history",
+"Dump the history of commands in this session.",
+nullptr),
 m_options (interpreter)
 {
 }
 
-~CommandObjectCommandsHistory () override {}
+~CommandObjectCommandsHistory() override = default;
 
 Options *
 GetOptions () override
@@ -56,11 +55,9 @@ public:
 }
 
 protected:
-
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options (interpreter),
 m_start_idx(0),
@@ -70,7 +67,7 @@ protected:
 {
 }
 
-~CommandOptions () override {}
+~CommandOptions() override = default;
 
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override
@@ -222,14 +219,13 @@ protected:
 OptionDefinition
 CommandObjectCommandsHistory::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, NULL, 
NULL, 0, eArgTypeUnsignedInteger,"How many history commands to print."},
-{ LLDB_OPT_SET_1, false, "start-index", 's', OptionParser::eRequiredArgument, 
NULL, NULL, 0, eArgTypeUnsignedInteger,  "Index at which to start printing 
history commands (or end to mean tail mode)."},
-{ LLDB_OPT_SET_1, false, "end-index", 'e', OptionParser::eRequiredArgument, 
NULL, NULL, 0, eArgTypeUnsignedInteger,"Index at which to stop printing 
history commands."},
-{ LLDB_OPT_SET_2, false, "clear", 'C', OptionParser::eNoArgument, NULL, NULL, 
0, eArgTypeBoolean,"Clears the current command history."},
-{ 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
+{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, 
nullptr, nullptr, 0, eArgTypeUnsignedInteger,"How many history commands 
to print."},
+{ LLDB_OPT_SET_1, false, "start-index", 's', OptionParser::eRequiredArgument, 
nullptr, nullptr, 0, eArgTypeUnsignedInteger,  "Index at which to start 
printing history commands (or end to mean tail mode)."},
+{ LLDB_OPT_SET_1, false, "end-index", 'e', OptionParser::eRequiredArgument, 
nullptr, nullptr, 0, eArgTypeUnsignedInteger,"Index at which to stop 
printing history commands."},
+{ LLDB_OPT_SET_2, false, "clear", 'C', OptionParser::eNoArgument, nullptr, 
nullptr, 0, eArgTypeBoolean,"Clears the current command history."},
+{ 0, false, nullptr, 0, 0, nullptr, nullptr, 0, eArgTypeNone, nullptr }
 };
 
-
 //-
 // CommandObjectCommandsSource
 //-
@@ -238,10 +234,10 @@ class CommandObjectCommandsSource : publ
 {
 public:
 CommandObjectCommandsSource(CommandInterpreter ) :
-CommandObjectParsed (interpreter,
- "command source",
- "Read in debugger commands from the file 
 and execute them.",
- NULL),
+CommandObjectParsed(interpreter,
+"command source",
+"Read in debugger commands from the file 
 and execute them.",
+nullptr),
 m_options (interpreter)
 {
 CommandArgumentEntry arg;
@@ -258,7 +254,7 @@ public:
 m_arguments.push_back (arg);
 }
 
-~CommandObjectCommandsSource () override {}
+ 

[Lldb-commits] [lldb] r261389 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.

2016-02-19 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Feb 19 18:58:29 2016
New Revision: 261389

URL: http://llvm.org/viewvc/llvm-project?rev=261389=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some 
files in source/Commands; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.h
lldb/trunk/source/Commands/CommandObjectHelp.cpp
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectMultiword.cpp
lldb/trunk/source/Commands/CommandObjectPlugin.cpp
lldb/trunk/source/Commands/CommandObjectSyntax.cpp

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=261389=261388=261389=diff
==
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Fri Feb 19 18:58:29 
2016
@@ -7,12 +7,11 @@
 //
 
//===--===//
 
-#include "CommandObjectDisassemble.h"
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+#include "CommandObjectDisassemble.h"
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"
@@ -54,9 +53,7 @@ CommandObjectDisassemble::CommandOptions
 OptionParsingStarting();
 }
 
-CommandObjectDisassemble::CommandOptions::~CommandOptions ()
-{
-}
+CommandObjectDisassemble::CommandOptions::~CommandOptions() = default;
 
 Error
 CommandObjectDisassemble::CommandOptions::SetOptionValue (uint32_t option_idx, 
const char *option_arg)
@@ -105,6 +102,7 @@ CommandObjectDisassemble::CommandOptions
 some_location_specified = true;
 }
 break;
+
 case 'n':
 func_name.assign (option_arg);
 some_location_specified = true;
@@ -139,6 +137,7 @@ CommandObjectDisassemble::CommandOptions
 error.SetErrorStringWithFormat("Disassembler flavors are 
currently only supported for x86 and x86_64 targets.");
 break;
 }
+
 case 'r':
 raw = true;
 break;
@@ -218,7 +217,6 @@ CommandObjectDisassemble::CommandOptions
 if (!some_location_specified)
 current_function = true;
 return Error();
-
 }
 
 const OptionDefinition*
@@ -230,33 +228,31 @@ CommandObjectDisassemble::CommandOptions
 OptionDefinition
 CommandObjectDisassemble::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_ALL, false, "bytes", 'b', OptionParser::eNoArgument 
   , NULL, NULL, 0, eArgTypeNone,"Show opcode bytes when 
disassembling."},
-{ LLDB_OPT_SET_ALL, false, "context"  , 'C', 
OptionParser::eRequiredArgument  , NULL, NULL, 0, eArgTypeNumLines,"Number 
of context lines of source to show."},
-{ LLDB_OPT_SET_ALL, false, "mixed", 'm', OptionParser::eNoArgument 
   , NULL, NULL, 0, eArgTypeNone,"Enable mixed source and assembly 
display."},
-{ LLDB_OPT_SET_ALL, false, "raw"  , 'r', OptionParser::eNoArgument 
   , NULL, NULL, 0, eArgTypeNone,"Print raw disassembly with no symbol 
information."},
-{ LLDB_OPT_SET_ALL, false, "plugin"   , 'P', 
OptionParser::eRequiredArgument  , NULL, NULL, 0, eArgTypePlugin,  "Name of 
the disassembler plugin you want to use."},
-{ LLDB_OPT_SET_ALL, false, "flavor"   , 'F', 
OptionParser::eRequiredArgument  , NULL, NULL, 0, eArgTypeDisassemblyFlavor,
"Name of the disassembly flavor you want to use.  "
+{ LLDB_OPT_SET_ALL, false, "bytes", 'b', OptionParser::eNoArgument 
   , nullptr, nullptr, 0, eArgTypeNone,"Show opcode bytes when 
disassembling."},
+{ LLDB_OPT_SET_ALL, false, "context"  , 'C', 
OptionParser::eRequiredArgument  , nullptr, nullptr, 0, eArgTypeNumLines,
"Number of context lines of source to show."},
+{ LLDB_OPT_SET_ALL, false, "mixed", 'm', OptionParser::eNoArgument 
   , nullptr, nullptr, 0, eArgTypeNone,"Enable mixed source and 
assembly display."},
+{ LLDB_OPT_SET_ALL, false, "raw"  , 'r', OptionParser::eNoArgument 
   , nullptr, nullptr, 0, eArgTypeNone,"Print raw disassembly with no 
symbol information."},
+{ LLDB_OPT_SET_ALL, false, "plugin"   , 'P', 
OptionParser::eRequiredArgument  , nullptr, nullptr, 0, eArgTypePlugin,  
"Name of the disassembler plugin you want to use."},
+{ LLDB_OPT_SET_ALL, false, "flavor"   , 'F', 
OptionParser::eRequiredArgument  , nullptr, nullptr, 0, 
eArgTypeDisassemblyFlavor,"Name of the disassembly flavor you want to 
use.  "

   "Currently the only valid 

Re: [Lldb-commits] [lldb] r261356 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.

2016-02-19 Thread Eugene Zelenko via lldb-commits
On Fri, Feb 19, 2016 at 12:33 PM, Jim Ingham  wrote:
> Please don't make this sort of change.  With the code as originally written, 
> I can set a breakpoint on the returns "true" or "false" case separately, and 
> stop there if I am doing that experiment, whereas your change makes that 
> impossible.  Neither one is particularly harder to read than the other, but 
> your version is significantly harder to debug.
>
> Jim

I this particular case it'w much easier to debug at point of usage.
Actually multiple comparisons could be replaced with strchr().

Eugene.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r261356 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.

2016-02-19 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Feb 19 13:33:46 2016
New Revision: 261356

URL: http://llvm.org/viewvc/llvm-project?rev=261356=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some 
files in source/Commands; other minor fixes.

Modified:
lldb/trunk/source/Commands/CommandCompletions.cpp
lldb/trunk/source/Commands/CommandObjectApropos.cpp
lldb/trunk/source/Commands/CommandObjectArgs.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp

Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=261356=261355=261356=diff
==
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Fri Feb 19 13:33:46 2016
@@ -15,6 +15,8 @@
 
 // C++ Includes
 // Other libraries and framework includes
+#include "llvm/ADT/SmallString.h"
+
 // Project includes
 #include "lldb/Host/FileSpec.h"
 #include "lldb/Core/FileSpecList.h"
@@ -29,14 +31,12 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/CleanUp.h"
 
-#include "llvm/ADT/SmallString.h"
-
 using namespace lldb_private;
 
 CommandCompletions::CommonCompletionElement
 CommandCompletions::g_common_completions[] =
 {
-{eCustomCompletion,  NULL},
+{eCustomCompletion,  nullptr},
 {eSourceFileCompletion,  CommandCompletions::SourceFiles},
 {eDiskFileCompletion,CommandCompletions::DiskFiles},
 {eDiskDirectoryCompletion,   CommandCompletions::DiskDirectories},
@@ -46,21 +46,18 @@ CommandCompletions::g_common_completions
 {ePlatformPluginCompletion,  CommandCompletions::PlatformPluginNames},
 {eArchitectureCompletion,CommandCompletions::ArchitectureNames},
 {eVariablePathCompletion,CommandCompletions::VariablePath},
-{eNoCompletion,  NULL}  // This one has to be last in the 
list.
+{eNoCompletion,  nullptr}  // This one has to be last in 
the list.
 };
 
 bool
-CommandCompletions::InvokeCommonCompletionCallbacks 
-(
-CommandInterpreter ,
-uint32_t completion_mask,
-const char *completion_str,
-int match_start_point,
-int max_return_elements,
-SearchFilter *searcher,
-bool _complete,
-StringList 
-)
+CommandCompletions::InvokeCommonCompletionCallbacks(CommandInterpreter 
,
+uint32_t completion_mask,
+const char *completion_str,
+int match_start_point,
+int max_return_elements,
+SearchFilter *searcher,
+bool _complete,
+StringList )
 {
 bool handled = false;
 
@@ -72,7 +69,7 @@ CommandCompletions::InvokeCommonCompleti
 if (g_common_completions[i].type == eNoCompletion)
 break;
  else if ((g_common_completions[i].type & completion_mask) == 
g_common_completions[i].type
-   && g_common_completions[i].callback != NULL)
+   && g_common_completions[i].callback != nullptr)
  {
 handled = true;
 g_common_completions[i].callback (interpreter,
@@ -88,16 +85,13 @@ CommandCompletions::InvokeCommonCompleti
 }
 
 int
-CommandCompletions::SourceFiles 
-(
-CommandInterpreter ,
-const char *partial_file_name,
-int match_start_point,
-int max_return_elements,
-SearchFilter *searcher,
-bool _complete,
-StringList 
-)
+CommandCompletions::SourceFiles(CommandInterpreter ,
+const char *partial_file_name,
+int match_start_point,
+int max_return_elements,
+SearchFilter *searcher,
+bool _complete,
+StringList )
 {
 word_complete = true;
 // Find some way to switch "include support files..."
@@ -108,7 +102,7 @@ CommandCompletions::SourceFiles
max_return_elements,
matches);
 
-if (searcher == NULL)
+if (searcher == nullptr)
 {
 lldb::TargetSP target_sp = 
interpreter.GetDebugger().GetSelectedTarget();
 SearchFilterForUnconstrainedSearches null_searcher (target_sp);
@@ -187,13 +181,10 @@ FileSpec::EnumerateDirectoryResult DiskF
 }
 
 static int
-DiskFilesOrDirectories 
-(
-const char *partial_file_name,
-bool only_directories,
-bool _directory,
-StringList 
-)

[Lldb-commits] [lldb] r261272 - Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectBreakpoint.cpp; other minor fixes.

2016-02-18 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Feb 18 16:39:14 2016
New Revision: 261272

URL: http://llvm.org/viewvc/llvm-project?rev=261272=rev
Log:
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in 
source/Commands/CommandObjectBreakpoint.cpp; other minor fixes.


Modified:
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=261272=261271=261272=diff
==
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Thu Feb 18 16:39:14 
2016
@@ -7,13 +7,14 @@
 //
 
//===--===//
 
-#include "CommandObjectBreakpoint.h"
-#include "CommandObjectBreakpointCommand.h"
-
 // C Includes
 // C++ Includes
+#include 
+
 // Other libraries and framework includes
 // Project includes
+#include "CommandObjectBreakpoint.h"
+#include "CommandObjectBreakpointCommand.h"
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointIDList.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
@@ -33,8 +34,6 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadSpec.h"
 
-#include 
-
 using namespace lldb;
 using namespace lldb_private;
 
@@ -51,11 +50,9 @@ AddBreakpointDescription (Stream *s, Bre
 // CommandObjectBreakpointSet
 //-
 
-
 class CommandObjectBreakpointSet : public CommandObjectParsed
 {
 public:
-
 typedef enum BreakpointSetType
 {
 eSetTypeInvalid,
@@ -76,8 +73,7 @@ public:
 {
 }
 
-
-~CommandObjectBreakpointSet () override {}
+~CommandObjectBreakpointSet() override = default;
 
 Options *
 GetOptions () override
@@ -88,7 +84,6 @@ public:
 class CommandOptions : public Options
 {
 public:
-
 CommandOptions (CommandInterpreter ) :
 Options (interpreter),
 m_condition (),
@@ -118,8 +113,7 @@ public:
 {
 }
 
-
-~CommandOptions () override {}
+~CommandOptions() override = default;
 
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override
@@ -153,6 +147,7 @@ public:
 error.SetErrorStringWithFormat("invalid column number: 
%s", option_arg);
 break;
 }
+
 case 'c':
 m_condition.assign(option_arg);
 break;
@@ -217,12 +212,10 @@ public:
 break;
 
 case 'i':
-{
 m_ignore_count = StringConvert::ToUInt32(option_arg, 
UINT32_MAX, 0);
 if (m_ignore_count == UINT32_MAX)
error.SetErrorStringWithFormat ("invalid ignore count 
'%s'", option_arg);
 break;
-}
 
 case 'K':
 {
@@ -306,10 +299,8 @@ public:
 break;
 
 case 's':
-{
 m_modules.AppendIfUnique (FileSpec (option_arg, false));
 break;
-}
 
 case 'S':
 m_func_names.push_back (option_arg);
@@ -317,12 +308,10 @@ public:
 break;
 
 case 't' :
-{
 m_thread_id = StringConvert::ToUInt64(option_arg, 
LLDB_INVALID_THREAD_ID, 0);
 if (m_thread_id == LLDB_INVALID_THREAD_ID)
error.SetErrorStringWithFormat ("invalid thread id 
string '%s'", option_arg);
-}
-break;
+break;
 
 case 'T':
 m_thread_name.assign (option_arg);
@@ -338,13 +327,10 @@ public:
 break;
 
 case 'x':
-{
 m_thread_index = StringConvert::ToUInt32(option_arg, 
UINT32_MAX, 0);
 if (m_thread_id == UINT32_MAX)
error.SetErrorStringWithFormat ("invalid thread index 
string '%s'", option_arg);
-
-}
-break;
+break;
 
 default:
 error.SetErrorStringWithFormat ("unrecognized option 
'%c'", short_option);
@@ -353,6 +339,7 @@ public:
 
 return error;
 }
+
 void
 OptionParsingStarting () override
 {
@@ -424,7 +411,6 @@ public:
 bool m_all_files;
 Args m_exception_extra_args;
 LazyBool m_move_to_nearest_code;
-
 };
 
 protected:
@@ -464,7 +450,7 @@ protected:
 else if (m_options.m_exception_language != eLanguageTypeUnknown)
 break_type = 

[Lldb-commits] [lldb] r261242 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes.

2016-02-18 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Feb 18 12:52:47 2016
New Revision: 261242

URL: http://llvm.org/viewvc/llvm-project?rev=261242=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; 
other minor fixes.

Modified:
lldb/trunk/source/Target/ProcessInfo.cpp
lldb/trunk/source/Target/Queue.cpp
lldb/trunk/source/Target/StackFrame.cpp
lldb/trunk/source/Target/StackFrameList.cpp
lldb/trunk/source/Target/StackID.cpp
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/SystemRuntime.cpp
lldb/trunk/source/Target/UnixSignals.cpp
lldb/trunk/source/Target/UnwindAssembly.cpp

Modified: lldb/trunk/source/Target/ProcessInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessInfo.cpp?rev=261242=261241=261242=diff
==
--- lldb/trunk/source/Target/ProcessInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessInfo.cpp Thu Feb 18 12:52:47 2016
@@ -7,10 +7,13 @@
 //
 
//===--===//
 
-#include "lldb/Target/ProcessInfo.h"
-
 // C Includes
-#include 
+// C++ Includes
+#include 
+
+// Other libraries and framework includes
+// Project includes
+#include "lldb/Target/ProcessInfo.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -83,9 +86,7 @@ ProcessInfo::SetExecutableFile (const Fi
 const char *
 ProcessInfo::GetArg0 () const
 {
-if (m_arg0.empty())
-return NULL;
-return m_arg0.c_str();
+return (m_arg0.empty() ? nullptr : m_arg0.c_str());
 }
 
 void
@@ -116,6 +117,7 @@ ProcessInfo::SetArguments (char const **
 }
 }
 }
+
 void
 ProcessInfo::SetArguments (const Args& args, bool first_arg_is_executable)
 {

Modified: lldb/trunk/source/Target/Queue.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Queue.cpp?rev=261242=261241=261242=diff
==
--- lldb/trunk/source/Target/Queue.cpp (original)
+++ lldb/trunk/source/Target/Queue.cpp Thu Feb 18 12:52:47 2016
@@ -7,6 +7,10 @@
 //
 
//===--===//
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Queue.h"
 #include "lldb/Target/QueueList.h"
@@ -32,9 +36,7 @@ Queue::Queue (ProcessSP process_sp, lldb
 m_process_wp = process_sp;
 }
 
-Queue::~Queue ()
-{
-}
+Queue::~Queue() = default;
 
 queue_id_t
 Queue::GetID ()
@@ -45,10 +47,7 @@ Queue::GetID ()
 const char *
 Queue::GetName ()
 {
-const char *result = NULL;
-if (m_queue_name.size() > 0)
-result = m_queue_name.c_str();
-return result;
+return (m_queue_name.empty() ? nullptr : m_queue_name.c_str());
 }
 
 uint32_t
@@ -62,7 +61,7 @@ Queue::GetThreads ()
 {
 std::vector result;
 ProcessSP process_sp = m_process_wp.lock();
-if (process_sp.get ())
+if (process_sp)
 {
 for (ThreadSP thread_sp : process_sp->Threads())
 {
@@ -87,7 +86,6 @@ Queue::GetNumRunningWorkItems () const
 return m_running_work_items_count;
 }
 
-
 void
 Queue::SetNumPendingWorkItems (uint32_t count)
 {
@@ -112,11 +110,10 @@ Queue::GetLibdispatchQueueAddress () con
 return m_dispatch_queue_t_addr;
 }
 
-
 const std::vector &
 Queue::GetPendingItems ()
 {
-if (m_pending_items.size() == 0)
+if (m_pending_items.empty())
 {
 ProcessSP process_sp = m_process_wp.lock();
 if (process_sp && process_sp->GetSystemRuntime())

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=261242=261241=261242=diff
==
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Thu Feb 18 12:52:47 2016
@@ -7,12 +7,11 @@
 //
 
//===--===//
 
-#include "lldb/Target/StackFrame.h"
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+#include "lldb/Target/StackFrame.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Disassembler.h"
@@ -58,7 +57,7 @@ StackFrame::StackFrame (const ThreadSP &
 m_frame_index (frame_idx),
 m_concrete_frame_index (unwind_frame_index),
 m_reg_context_sp (),
-m_id (pc, cfa, NULL),
+m_id(pc, cfa, nullptr),
 m_frame_code_addr (pc),
 m_sc (),
 m_flags (),
@@ -75,12 +74,12 @@ StackFrame::StackFrame (const ThreadSP &
 {
 // If we don't have a CFA value, use the frame index for our StackID so 
that recursive
 // functions properly aren't confused with one another on a history stack.
-if (m_is_history_frame && m_cfa_is_valid == false)
+if 

[Lldb-commits] [lldb] r261179 - Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.

2016-02-17 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Feb 17 18:10:17 2016
New Revision: 261179

URL: http://llvm.org/viewvc/llvm-project?rev=261179=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.

Modified:
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/source/Target/ABI.cpp
lldb/trunk/source/Target/ExecutionContext.cpp
lldb/trunk/source/Target/InstrumentationRuntime.cpp
lldb/trunk/source/Target/JITLoader.cpp
lldb/trunk/source/Target/LanguageRuntime.cpp
lldb/trunk/source/Target/MemoryHistory.cpp
lldb/trunk/source/Target/OperatingSystem.cpp
lldb/trunk/source/Target/PathMappingList.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
lldb/trunk/source/Target/RegisterContext.cpp

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=261179=261178=261179=diff
==
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Wed Feb 17 18:10:17 2016
@@ -1325,10 +1325,10 @@ class ModuleCache;
 class OptionGroupPlatformRSync : public lldb_private::OptionGroup
 {
 public:
-OptionGroupPlatformRSync ();
-
-~OptionGroupPlatformRSync() override;
-
+OptionGroupPlatformRSync() = default;
+
+~OptionGroupPlatformRSync() override = default;
+
 lldb_private::Error
 SetOptionValue(CommandInterpreter ,
   uint32_t option_idx,
@@ -1353,6 +1353,7 @@ class ModuleCache;
 std::string m_rsync_opts;
 std::string m_rsync_prefix;
 bool m_ignores_remote_hostname;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformRSync);
 };
@@ -1360,10 +1361,10 @@ class ModuleCache;
 class OptionGroupPlatformSSH : public lldb_private::OptionGroup
 {
 public:
-OptionGroupPlatformSSH ();
-
-~OptionGroupPlatformSSH() override;
-
+OptionGroupPlatformSSH() = default;
+
+~OptionGroupPlatformSSH() override = default;
+
 lldb_private::Error
 SetOptionValue(CommandInterpreter ,
   uint32_t option_idx,
@@ -1394,10 +1395,10 @@ class ModuleCache;
 class OptionGroupPlatformCaching : public lldb_private::OptionGroup
 {
 public:
-OptionGroupPlatformCaching ();
-
-~OptionGroupPlatformCaching() override;
-
+OptionGroupPlatformCaching() = default;
+
+~OptionGroupPlatformCaching() override = default;
+
 lldb_private::Error
 SetOptionValue(CommandInterpreter ,
   uint32_t option_idx,

Modified: lldb/trunk/source/Target/ABI.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ABI.cpp?rev=261179=261178=261179=diff
==
--- lldb/trunk/source/Target/ABI.cpp (original)
+++ lldb/trunk/source/Target/ABI.cpp Wed Feb 17 18:10:17 2016
@@ -7,6 +7,10 @@
 //
 
//===--===//
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Target/ABI.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Value.h"
@@ -27,7 +31,7 @@ ABI::FindPlugin (const ArchSpec )
 ABICreateInstance create_callback;
 
 for (uint32_t idx = 0;
- (create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) 
!= NULL;
+ (create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) 
!= nullptr;
  ++idx)
 {
 abi_sp = create_callback(arch);
@@ -39,19 +43,9 @@ ABI::FindPlugin (const ArchSpec )
 return abi_sp;
 }
 
-//--
-// Constructor
-//--
-ABI::ABI()
-{
-}
+ABI::ABI() = default;
 
-//--
-// Destructor
-//--
-ABI::~ABI()
-{
-}
+ABI::~ABI() = default;
 
 bool
 ABI::GetRegisterInfoByName (const ConstString , RegisterInfo )
@@ -62,7 +56,7 @@ ABI::GetRegisterInfoByName (const ConstS
 {
 const char *unique_name_cstr = name.GetCString();
 uint32_t i;
-for (i=0; i

[Lldb-commits] [PATCH] D16662: [LLDB] Remove autoconf support from source directories

2016-01-27 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko created this revision.
Eugene.Zelenko added reviewers: clayborg, labath, zturner.
Eugene.Zelenko added a subscriber: lldb-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Herald added subscribers: dsanders, srhines, danalbert, tberghammer, emaste.

autoconf support was removed from LLVM, Clang, etc yesterday, but it's still 
left in LLDB code.

Repository:
  rL LLVM

http://reviews.llvm.org/D16662

Files:
  Makefile
  include/Makefile
  include/lldb/Makefile
  lib/Makefile
  scripts/Makefile
  scripts/Python/Makefile
  scripts/Python/modules/Makefile
  scripts/Python/modules/readline/Makefile
  source/API/Makefile
  source/Breakpoint/Makefile
  source/Commands/Makefile
  source/Core/Makefile
  source/DataFormatters/Makefile
  source/Expression/Makefile
  source/Host/Makefile
  source/Host/netbsd/Makefile
  source/Initialization/Makefile
  source/Interpreter/Makefile
  source/Makefile
  source/Plugins/ABI/MacOSX-arm/Makefile
  source/Plugins/ABI/MacOSX-arm64/Makefile
  source/Plugins/ABI/MacOSX-i386/Makefile
  source/Plugins/ABI/SysV-arm/Makefile
  source/Plugins/ABI/SysV-arm64/Makefile
  source/Plugins/ABI/SysV-hexagon/Makefile
  source/Plugins/ABI/SysV-i386/Makefile
  source/Plugins/ABI/SysV-mips/Makefile
  source/Plugins/ABI/SysV-mips64/Makefile
  source/Plugins/ABI/SysV-ppc/Makefile
  source/Plugins/ABI/SysV-ppc64/Makefile
  source/Plugins/ABI/SysV-x86_64/Makefile
  source/Plugins/Disassembler/llvm/Makefile
  source/Plugins/DynamicLoader/Darwin-Kernel/Makefile
  source/Plugins/DynamicLoader/Hexagon-DYLD/Makefile
  source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile
  source/Plugins/DynamicLoader/POSIX-DYLD/Makefile
  source/Plugins/DynamicLoader/Static/Makefile
  source/Plugins/DynamicLoader/Windows-DYLD/Makefile
  source/Plugins/ExpressionParser/Clang/Makefile
  source/Plugins/ExpressionParser/Go/Makefile
  source/Plugins/Instruction/ARM/Makefile
  source/Plugins/Instruction/ARM64/Makefile
  source/Plugins/Instruction/MIPS/Makefile
  source/Plugins/Instruction/MIPS64/Makefile
  source/Plugins/InstrumentationRuntime/AddressSanitizer/Makefile
  source/Plugins/JITLoader/GDB/Makefile
  source/Plugins/Language/CPlusPlus/Makefile
  source/Plugins/Language/Go/Makefile
  source/Plugins/Language/ObjC/Makefile
  source/Plugins/Language/ObjCPlusPlus/Makefile
  source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Makefile
  source/Plugins/LanguageRuntime/Go/Makefile
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/Makefile
  source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/Makefile
  source/Plugins/Makefile
  source/Plugins/MemoryHistory/asan/Makefile
  source/Plugins/ObjectContainer/BSD-Archive/Makefile
  source/Plugins/ObjectContainer/Universal-Mach-O/Makefile
  source/Plugins/ObjectFile/ELF/Makefile
  source/Plugins/ObjectFile/JIT/Makefile
  source/Plugins/ObjectFile/Mach-O/Makefile
  source/Plugins/ObjectFile/PECOFF/Makefile
  source/Plugins/OperatingSystem/Go/Makefile
  source/Plugins/OperatingSystem/Python/Makefile
  source/Plugins/Platform/Android/Makefile
  source/Plugins/Platform/FreeBSD/Makefile
  source/Plugins/Platform/Kalimba/Makefile
  source/Plugins/Platform/Linux/Makefile
  source/Plugins/Platform/MacOSX/Makefile
  source/Plugins/Platform/Makefile
  source/Plugins/Platform/NetBSD/Makefile
  source/Plugins/Platform/POSIX/Makefile
  source/Plugins/Platform/Windows/Makefile
  source/Plugins/Platform/gdb-server/Makefile
  source/Plugins/Process/FreeBSD/Makefile
  source/Plugins/Process/Linux/Makefile
  source/Plugins/Process/MacOSX-Kernel/Makefile
  source/Plugins/Process/POSIX/Makefile
  source/Plugins/Process/Utility/Makefile
  source/Plugins/Process/elf-core/Makefile
  source/Plugins/Process/gdb-remote/Makefile
  source/Plugins/Process/mach-core/Makefile
  source/Plugins/ScriptInterpreter/None/Makefile
  source/Plugins/ScriptInterpreter/Python/Makefile
  source/Plugins/SymbolFile/DWARF/Makefile
  source/Plugins/SymbolFile/Symtab/Makefile
  source/Plugins/SymbolVendor/ELF/Makefile
  source/Plugins/SymbolVendor/MacOSX/Makefile
  source/Plugins/SystemRuntime/MacOSX/Makefile
  source/Plugins/UnwindAssembly/InstEmulation/Makefile
  source/Plugins/UnwindAssembly/x86/Makefile
  source/Symbol/Makefile
  source/Target/Makefile
  source/Utility/Makefile
  tools/Makefile
  tools/debugserver/Makefile
  tools/debugserver/source/MacOSX/Makefile
  tools/debugserver/source/MacOSX/i386/Makefile
  tools/debugserver/source/MacOSX/x86_64/Makefile
  tools/debugserver/source/Makefile
  tools/driver/Makefile
  tools/install-headers/Makefile
  tools/lldb-mi/Makefile
  tools/lldb-server/Makefile

Index: Makefile
===
--- Makefile
+++ Makefile
@@ -1,120 +0,0 @@
-##===- Makefile *- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for 

Re: [Lldb-commits] [lldb] r255598 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/.

2015-12-15 Thread Eugene Zelenko via lldb-commits
Hi, Jim!

On Mon, Dec 14, 2015 at 6:10 PM, Jim Ingham <jing...@apple.com> wrote:
> I see the value of replacing NULL with nullptr, but I don't see the value of 
> these sorts of changes:
>
>> On Dec 14, 2015, at 5:33 PM, Eugene Zelenko via lldb-commits 
>> <lldb-commits@lists.llvm.org> wrote:
>>
>> @@ -118,19 +111,13 @@ ThreadPlanStepInstruction::IsPlanStale (
>> StackID cur_frame_id = m_thread.GetStackFrameAtIndex(0)->GetStackID();
>> if (cur_frame_id == m_stack_id)
>> {
>> -if (m_thread.GetRegisterContext()->GetPC(0) != m_instruction_addr)
>> -return true;
>> -else
>> -return false;
>> +return (m_thread.GetRegisterContext()->GetPC(0) != 
>> m_instruction_addr);
>> }
>
> To my eye the second version though more dense, is actually harder to read.  
> I tend to write returns this way because I like it this way.  It mirrors the 
> thought process - I'm testing something, then doing something, and makes the 
> various bits of code that do these tests have some uniformity, rather than 
> burying them behind an assignment or return.  Moreover, I don't see the point 
> of going through and changing code you didn't write to fit your or clang 
> tidy's preferences.  It just sprinkles more random changes into the history 
> that folks doing archeology now have to look past, and makes the code look 
> like it wasn't written by whoever wrote it.  I don't see the value in either 
> of these.
>
> Jim

On my personal opinion LLDB as part of LLVM should represent project
as example of best code possible, even if it significantly lags behind
LLVM as of now. I'm trying to help as much as I could. But
concentrating on the past (however good it was) will never allow to do
that.

I don't think that expectation of keeping personal touch is right one
for any big project, especially open source one.

I think it's always good idea to learn good practices from other
people, especially formalized through automated tools.

Eugene.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r255598 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/.

2015-12-14 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Mon Dec 14 19:33:19 2015
New Revision: 255598

URL: http://llvm.org/viewvc/llvm-project?rev=255598=rev
Log:
Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr 
warnings in some files in source/Target/.

Simplify smart pointers checks in conditions. Other minor fixes.

Modified:
lldb/trunk/source/Target/TargetList.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadList.cpp
lldb/trunk/source/Target/ThreadPlan.cpp
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
lldb/trunk/source/Target/ThreadPlanCallFunctionUsingABI.cpp
lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp
lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp
lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepOut.cpp
lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp
lldb/trunk/source/Target/ThreadPlanStepThrough.cpp
lldb/trunk/source/Target/ThreadPlanStepUntil.cpp
lldb/trunk/source/Target/ThreadPlanTracer.cpp
lldb/trunk/source/Target/ThreadSpec.cpp

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=255598=255597=255598=diff
==
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Mon Dec 14 19:33:19 2015
@@ -10,6 +10,8 @@
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
+#include "llvm/ADT/SmallString.h"
+
 // Project includes
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/Debugger.h"
@@ -27,8 +29,6 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/TargetList.h"
 
-#include "llvm/ADT/SmallString.h"
-
 using namespace lldb;
 using namespace lldb_private;
 
@@ -227,7 +227,7 @@ TargetList::CreateTargetInternal (Debugg
 // since the user may have specified it.
 if (platform_sp)
 {
-if 
(platform_sp->IsCompatibleArchitecture(module_spec.GetArchitecture(), false, 
NULL))
+if 
(platform_sp->IsCompatibleArchitecture(module_spec.GetArchitecture(), false, 
nullptr))
 {
 platforms.push_back(platform_sp);
 continue;
@@ -237,7 +237,7 @@ TargetList::CreateTargetInternal (Debugg
 // Next check the host platform it if wasn't 
already checked above
 if (host_platform_sp && (!platform_sp || 
host_platform_sp->GetName() != platform_sp->GetName()))
 {
-if 
(host_platform_sp->IsCompatibleArchitecture(module_spec.GetArchitecture(), 
false, NULL))
+if 
(host_platform_sp->IsCompatibleArchitecture(module_spec.GetArchitecture(), 
false, nullptr))
 {
 platforms.push_back(host_platform_sp);
 continue;
@@ -253,7 +253,7 @@ TargetList::CreateTargetInternal (Debugg
 }
 }
 
-Platform *platform_ptr = NULL;
+Platform *platform_ptr = nullptr;
 bool more_than_one_platforms = false;
 for (const auto _platform_sp : platforms)
 {
@@ -262,7 +262,7 @@ TargetList::CreateTargetInternal (Debugg
 if (platform_ptr->GetName() != 
the_platform_sp->GetName())
 {
 more_than_one_platforms = true;
-platform_ptr = NULL;
+platform_ptr = nullptr;
 break;
 }
 }
@@ -386,7 +386,6 @@ TargetList::CreateTargetInternal (Debugg
   lldb::TargetSP _sp,
   bool is_dummy_target)
 {
-
 Timer scoped_timer (__PRETTY_FUNCTION__,
 "TargetList::CreateTarget (file = '%s', arch = '%s')",
 user_exe_path,
@@ -397,7 +396,7 @@ TargetList::CreateTargetInternal (Debugg
 
 if (arch.IsValid())
 {
-if (!platform_sp || !platform_sp->IsCompatibleArchitecture(arch, 
false, NULL))
+if (!platform_sp || !platform_sp->IsCompatibleArchitecture(arch, 
false, nullptr))
 platform_sp = Platform::GetPlatformForArchitecture(specified_arch, 
);
 }
 
@@ -453,14 +452,14 @@ TargetList::CreateTargetInternal (Debugg
 {
 FileSpecList 

Re: [Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.

2015-12-11 Thread Eugene Zelenko via lldb-commits
Hi, Todd!

As far as I know Clang-format doesn't leave spaces. Somebody pointed
to old discussion on this matter, but I forgot it locations :-(

I think will be good idea to implement automatic run of Clang-format
as pre-commit hook, since LLDB code have too much diversity in code
formatting for single project.

Eugene.

On Fri, Dec 11, 2015 at 1:55 PM, Todd Fiala <todd.fi...@gmail.com> wrote:
> Hey Eugene and Greg,
>
> I thought we were doing spaces before the open parens in places like this:
>
> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL,
> ...
> +BreakpointResolverSP resolver_sp(new
> BreakpointResolverFileLine(nullptr,
>
> (see the removal of the space after BreakpointResolverFileLine from the
> clang-tidy settings I presume).
>
> Did I misunderstand that?
>
> -Todd
>
> On Fri, Dec 11, 2015 at 11:52 AM, Eugene Zelenko via lldb-commits
> <lldb-commits@lists.llvm.org> wrote:
>>
>> Author: eugenezelenko
>> Date: Fri Dec 11 13:52:15 2015
>> New Revision: 255364
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=255364=rev
>> Log:
>> Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr
>> warnings in source/Target/Target.cpp.
>>
>> Simplify smart pointers checks in conditions.
>>
>> Modified:
>> lldb/trunk/source/Target/Target.cpp
>>
>> Modified: lldb/trunk/source/Target/Target.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=255364=255363=255364=diff
>>
>> ==
>> --- lldb/trunk/source/Target/Target.cpp (original)
>> +++ lldb/trunk/source/Target/Target.cpp Fri Dec 11 13:52:15 2015
>> @@ -178,7 +178,7 @@ Target::CleanupProcess ()
>>  void
>>  Target::DeleteCurrentProcess ()
>>  {
>> -if (m_process_sp.get())
>> +if (m_process_sp)
>>  {
>>  m_section_load_history.Clear();
>>  if (m_process_sp->IsAlive())
>> @@ -333,7 +333,7 @@ Target::CreateSourceRegexBreakpoint (con
>>  SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList
>> (containingModules, source_file_spec_list));
>>  if (move_to_nearest_code == eLazyBoolCalculate)
>>  move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes :
>> eLazyBoolNo;
>> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex
>> (NULL, source_regex, !static_cast(move_to_nearest_code)));
>> +BreakpointResolverSP resolver_sp(new
>> BreakpointResolverFileRegex(nullptr, source_regex,
>> !static_cast(move_to_nearest_code)));
>>  return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware,
>> true);
>>  }
>>
>> @@ -385,12 +385,12 @@ Target::CreateBreakpoint (const FileSpec
>>  if (move_to_nearest_code == eLazyBoolCalculate)
>>  move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes :
>> eLazyBoolNo;
>>
>> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine
>> (NULL,
>> -
>> file,
>> -
>> line_no,
>> -
>> check_inlines,
>> -
>> skip_prologue,
>> -
>> !static_cast(move_to_nearest_code)));
>> +BreakpointResolverSP resolver_sp(new
>> BreakpointResolverFileLine(nullptr,
>> +file,
>> +
>> line_no,
>> +
>> check_inlines,
>> +
>> skip_prologue,
>> +
>> !static_cast(move_to_nearest_code)));
>>  return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware,
>> true);
>>  }
>>
>> @@ -420,7 +420,7 @@ BreakpointSP
>>  Target::CreateBreakpoint (const Address , bool internal, bool
>> hardware)
>>  {
>>  SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches
>> (shared_from_this()));
>> -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress
>> (NULL, addr));
>> +BreakpointResolverSP resolver_sp(new
>> BreakpointResolverAddress(nullptr, addr));
>>  return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware,
>> false);
>>  }
>>
>> @@ -431,7 +431,7 @@ Target::CreateAddressInModuleBreakpoint
>>   bool request_hardware)
>>  {
>>  SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches
>> (shared_from_this()));
>> -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress
>> (NULL, file_addr, file_spec));
>> +BreakpointResolverSP resolver_sp(new
>> Break

Re: [Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.

2015-12-11 Thread Eugene Zelenko via lldb-commits
At least clang-format should be applied to all newly added files before commit.

Eugene.

On Fri, Dec 11, 2015 at 2:30 PM, Zachary Turner  wrote:
> Back on the topic of clang-format, what would it take to make clang-format a
> regular part of peoples' workflows?
>
> On Fri, Dec 11, 2015 at 2:27 PM Todd Fiala  wrote:
>>
>> Yep - sorry.  I had been talking to Greg about this and misunderstood his
>> comment on it. My mistake entirely.  Kate and I just talked and she pointed
>> me to your document, Jim.
>>
>> The description was:
>> where we had a clearly adhered to standard, keep it.
>> whee we didn't, we adopted LLVM.
>>
>> Sorry for rehashing!
>>
>> -Todd
>>
>> On Fri, Dec 11, 2015 at 2:12 PM, Jim Ingham  wrote:
>>>
>>>
>>> On Dec 11, 2015, at 2:01 PM, Todd Fiala via lldb-commits
>>>  wrote:
>>>
>>>
>>>
>>> On Fri, Dec 11, 2015 at 1:59 PM, Zachary Turner 
>>> wrote:

 On Fri, Dec 11, 2015 at 1:55 PM Todd Fiala via lldb-commits
  wrote:
>
> Hey Eugene and Greg,
>
> I thought we were doing spaces before the open parens in places like
> this:
>
> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine
> (NULL,
> ...
> +BreakpointResolverSP resolver_sp(new
> BreakpointResolverFileLine(nullptr,
>
> (see the removal of the space after BreakpointResolverFileLine from the
> clang-tidy settings I presume).
>
> Did I misunderstand that?


 This was officially removed from the coding standard some months ago,
>>>
>>>
>>> Okay.  Are we 100% in sync with LLVM coding standard guidelines?  If so I
>>> can just look there to see what we're supposed to be doing.
>>>
>>>
>>> No, the differences between the lldb and llvm coding standards are
>>> documented in:
>>>
>>> http://lldb.llvm.org/lldb-coding-conventions.html
>>>
>>> Jim
>>>
>>>

 but not everyone has adopted this unfortunately.  See r228860.  It pains
 me to no end that we differ from LLVM, because it leads to exactly these
 type of problems where people aren't sure what the exact set of rules are.
>>>
>>>
>>>
>>>
>>> --
>>> -Todd
>>> ___
>>> lldb-commits mailing list
>>> lldb-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>>
>>>
>>
>>
>>
>> --
>> -Todd
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.

2015-12-11 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Dec 11 13:52:15 2015
New Revision: 255364

URL: http://llvm.org/viewvc/llvm-project?rev=255364=rev
Log:
Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr 
warnings in source/Target/Target.cpp.

Simplify smart pointers checks in conditions.

Modified:
lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=255364=255363=255364=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Fri Dec 11 13:52:15 2015
@@ -178,7 +178,7 @@ Target::CleanupProcess ()
 void
 Target::DeleteCurrentProcess ()
 {
-if (m_process_sp.get())
+if (m_process_sp)
 {
 m_section_load_history.Clear();
 if (m_process_sp->IsAlive())
@@ -333,7 +333,7 @@ Target::CreateSourceRegexBreakpoint (con
 SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList 
(containingModules, source_file_spec_list));
 if (move_to_nearest_code == eLazyBoolCalculate)
 move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : 
eLazyBoolNo;
-BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (NULL, 
source_regex, !static_cast(move_to_nearest_code)));
+BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex(nullptr, 
source_regex, !static_cast(move_to_nearest_code)));
 return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true);
 }
 
@@ -385,12 +385,12 @@ Target::CreateBreakpoint (const FileSpec
 if (move_to_nearest_code == eLazyBoolCalculate)
 move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : 
eLazyBoolNo;
 
-BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL,
- file,
- line_no,
- 
check_inlines,
- 
skip_prologue,
- 
!static_cast(move_to_nearest_code)));
+BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine(nullptr,
+file,
+line_no,
+
check_inlines,
+
skip_prologue,
+
!static_cast(move_to_nearest_code)));
 return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true);
 }
 
@@ -420,7 +420,7 @@ BreakpointSP
 Target::CreateBreakpoint (const Address , bool internal, bool hardware)
 {
 SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches 
(shared_from_this()));
-BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (NULL, 
addr));
+BreakpointResolverSP resolver_sp(new BreakpointResolverAddress(nullptr, 
addr));
 return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, 
false);
 }
 
@@ -431,7 +431,7 @@ Target::CreateAddressInModuleBreakpoint
  bool request_hardware)
 {
 SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches 
(shared_from_this()));
-BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (NULL, 
file_addr, file_spec));
+BreakpointResolverSP resolver_sp(new BreakpointResolverAddress(nullptr, 
file_addr, file_spec));
 return CreateBreakpoint (filter_sp, resolver_sp, internal, 
request_hardware, false);
 }
 
@@ -455,12 +455,12 @@ Target::CreateBreakpoint (const FileSpec
 if (language == lldb::eLanguageTypeUnknown)
 language = GetLanguage();
 
-BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, 
-  
func_name, 
-  
func_name_type_mask, 
-  language,
-  
Breakpoint::Exact, 
-  
skip_prologue));
+BreakpointResolverSP resolver_sp(new BreakpointResolverName(nullptr, 
+func_name, 
+
func_name_type_mask, 
+language,
+
Breakpoint::Exact, 
+

  1   2   >