From 02bf92d22651dd7feb2828974fdcc5dc0e23ddfb Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 12 Nov 2015 17:01:48 +0000 Subject: [PATCH] Fix non-Windows build after r252906. llvm-svn: 252909 --- lldb/scripts/Python/python-wrapper.swig | 2 +- lldb/scripts/lldb.swig | 1 + .../Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 2 +- .../Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 250af21eae00..9d28bc9d1d31 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -566,7 +566,7 @@ LLDBSwigPython_CalculateNumChildren } if (argc.count == 1) - ret_val = std::min(ret_val, max); + ret_val = std::min(ret_val, static_cast(max)); return ret_val; } diff --git a/lldb/scripts/lldb.swig b/lldb/scripts/lldb.swig index 99db6faca610..1d333540728c 100644 --- a/lldb/scripts/lldb.swig +++ b/lldb/scripts/lldb.swig @@ -48,6 +48,7 @@ import six /* C++ headers to be included. */ %{ +#include #include %} diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index abcf71b86630..73f9b8cae889 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -109,7 +109,7 @@ PythonObject::Str() const } PythonObject -PythonObject::ResolveNameWithDictionary(llvm::StringRef name, PythonDictionary dict) +PythonObject::ResolveNameWithDictionary(llvm::StringRef name, const PythonDictionary &dict) { size_t dot_pos = name.find_first_of('.'); llvm::StringRef piece = name.substr(0, dot_pos); diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 3794cc04a655..a23052f68719 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -205,11 +205,11 @@ public: Str() const; static PythonObject - ResolveNameWithDictionary(llvm::StringRef name, PythonDictionary dict); + ResolveNameWithDictionary(llvm::StringRef name, const PythonDictionary &dict); template static T - ResolveNameWithDictionary(llvm::StringRef name, PythonDictionary dict) + ResolveNameWithDictionary(llvm::StringRef name, const PythonDictionary &dict) { return ResolveNameWithDictionary(name, dict).AsType(); }