Made GetClangTargetCPU() const.

Summary:
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.

Reviewers: labath, eugene

Reviewed By: labath, eugene

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D30515
Author:	Jason Majors <jmajors@google.com>

llvm-svn: 296868
This commit is contained in:
Pavel Labath 2017-03-03 13:35:49 +00:00
parent 26e176e558
commit 0a0d354ee6
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ public:
/// @return A string representing target CPU for the current
/// architecture.
//------------------------------------------------------------------
std::string GetClangTargetCPU();
std::string GetClangTargetCPU() const;
//------------------------------------------------------------------
/// Return a string representing target application ABI.

View File

@ -657,7 +657,7 @@ void ArchSpec::SetFlags(std::string elf_abi) {
SetFlags(flag);
}
std::string ArchSpec::GetClangTargetCPU() {
std::string ArchSpec::GetClangTargetCPU() const {
std::string cpu;
const llvm::Triple::ArchType machine = GetMachine();