[lldb-dev] StringRef recommendation (Re: lldb-commits Digest, Vol 9, Issue 18)
kirk.beitz at nokia.com
kirk.beitz at nokia.com
Mon Feb 7 09:27:02 PST 2011
chris, thanks for the pointer. there are some other sites where the solution i gave to greg will have to be replaced. i will certainly look into it for this.
++ kirk
On 2011-Feb-6, at 10:00 AM, ext lldb-commits-request at cs.uiuc.edu<mailto:lldb-commits-request at cs.uiuc.edu> wrote:
----------------------------------------------------------------------
Message: 1
Date: Sun, 6 Feb 2011 05:56:27 -0800
From: Chris Lattner <clattner at apple.com<mailto:clattner at apple.com>>
Subject: Re: [Lldb-commits] [lldb] r124889 - in /lldb/trunk/source:
Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp lldb-log.cpp
To: Greg Clayton <gclayton at apple.com<mailto:gclayton at apple.com>>
Cc: lldb-commits at cs.uiuc.edu<mailto:lldb-commits at cs.uiuc.edu>
Message-ID: <73ACC24C-67DF-4672-8205-F90C4ADB3221 at apple.com<mailto:73ACC24C-67DF-4672-8205-F90C4ADB3221 at apple.com>>
Content-Type: text/plain; charset=us-ascii
On Feb 4, 2011, at 10:55 AM, Greg Clayton wrote:
Author: gclayton
Date: Fri Feb 4 12:55:41 2011
New Revision: 124889
URL: http://llvm.org/viewvc/llvm-project?rev=124889&view=rev
Log:
Patch to remove uses of non-standard strcasestr and replace then with
strncasecmp equivalents from Kirk Beitz.
FWIW, I strongly recommend using StringRef for this sort of code. It has methods like compare_lower which are portable, and also efficient.
For case sensitive stuff, LLVM has a StringSwitch template which works well and is also efficient.
-Chris
++ kirk beitz : nokia : austin + san diego : kirk.beitz at nokia.com<mailto:kirk.beitz at nokia.com> ++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20110207/d978e103/attachment.html>
More information about the lldb-dev
mailing list