Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.
authorZachary Turner <zturner@google.com>
Thu, 15 Sep 2016 18:41:48 +0000 (18:41 +0000)
committerZachary Turner <zturner@google.com>
Thu, 15 Sep 2016 18:41:48 +0000 (18:41 +0000)
commitf6607454d4cb52d56c0281d306417dd22cbf6688
treeb1432adf1979ea5c9e434634fedc695aaf31298b
parentf6eea04cd134ebc149017f68d5b33b73113bdd0c
Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.

This makes the code easier to grok, and since this is a very low
level function it also is very helpful to have this take a StringRef
since it means anyone higher up the chain who has a StringRef would
have to first convert it to a null-terminated string.  This way it
can work equally well with StringRefs or const char*'s, which will
enable the conversion of higher up functions to StringRef.

Tested on Windows, Linux, and OSX and saw no regressions.

llvm-svn: 281642
lldb/include/lldb/Core/ArchSpec.h
lldb/source/Core/ArchSpec.cpp
lldb/unittests/Core/ArchSpecTest.cpp