[Lldb-commits] [PATCH] D30515: Made GetClangTargetCPU() const.
Jason Majors via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 1 16:26:01 PST 2017
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30515.90255.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170302/4e1695ea/attachment.bin>
More information about the lldb-commits
mailing list