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.
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
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits