summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-03-03 13:35:49 +0000
committerPavel Labath <labath@google.com>2017-03-03 13:35:49 +0000
commit0a0d354ee69f7e35537f4a86ecf6779583561b68 (patch)
treec20fb2183eecdc99a2ae25ea6c36c11c417ab919
parent26e176e5589b1ff670e66f5cbed09103532aa9ae (diff)
downloadbcm5719-llvm-0a0d354ee69f7e35537f4a86ecf6779583561b68.tar.gz
bcm5719-llvm-0a0d354ee69f7e35537f4a86ecf6779583561b68.zip
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
-rw-r--r--lldb/include/lldb/Core/ArchSpec.h2
-rw-r--r--lldb/source/Core/ArchSpec.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/include/lldb/Core/ArchSpec.h b/lldb/include/lldb/Core/ArchSpec.h
index 331a5780887..e4d61748d4d 100644
--- a/lldb/include/lldb/Core/ArchSpec.h
+++ b/lldb/include/lldb/Core/ArchSpec.h
@@ -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.
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp
index 0d10ab7be44..9da2942b67a 100644
--- a/lldb/source/Core/ArchSpec.cpp
+++ b/lldb/source/Core/ArchSpec.cpp
@@ -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();
OpenPOWER on IntegriCloud