[Lldb-commits] [PATCH] D30515: Made GetClangTargetCPU() const.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 1 16:43:09 PST 2017


lgtm

On Wed, Mar 1, 2017 at 4:26 PM Jason Majors via Phabricator via
lldb-commits <lldb-commits at lists.llvm.org> wrote:

> jmajors created this revision.
>
> It does not change members or call non-const members.
> HostInfo::GetArchitecture() returns a const object ref (maybe others?),
> which can't access the non-const function.
>
>
> https://reviews.llvm.org/D30515
>
> Files:
>   include/lldb/Core/ArchSpec.h
>   source/Core/ArchSpec.cpp
>
>
> Index: source/Core/ArchSpec.cpp
> ===================================================================
> --- source/Core/ArchSpec.cpp
> +++ source/Core/ArchSpec.cpp
> @@ -657,7 +657,7 @@
>    SetFlags(flag);
>  }
>
> -std::string ArchSpec::GetClangTargetCPU() {
> +std::string ArchSpec::GetClangTargetCPU() const {
>    std::string cpu;
>    const llvm::Triple::ArchType machine = GetMachine();
>
> Index: include/lldb/Core/ArchSpec.h
> ===================================================================
> --- include/lldb/Core/ArchSpec.h
> +++ include/lldb/Core/ArchSpec.h
> @@ -307,7 +307,7 @@
>    /// @return A string representing target CPU for the current
>    ///         architecture.
>    //------------------------------------------------------------------
> -  std::string GetClangTargetCPU();
> +  std::string GetClangTargetCPU() const;
>
>    //------------------------------------------------------------------
>    /// Return a string representing target application ABI.
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170302/55a3ea7f/attachment.html>


More information about the lldb-commits mailing list