summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2012-12-04 00:23:45 +0000
committerDaniel Malea <daniel.malea@intel.com>2012-12-04 00:23:45 +0000
commit48947c7bbfbe15c608d130b377b474f9fa8185ae (patch)
treeb229ca281fa85f7fd3aecd4e33d13706abb7a2ae
parentf97efd978bd7a72c598b30267ed58118f7a21c74 (diff)
downloadbcm5719-llvm-48947c7bbfbe15c608d130b377b474f9fa8185ae.tar.gz
bcm5719-llvm-48947c7bbfbe15c608d130b377b474f9fa8185ae.zip
A few more build fixes for gcc 4.6:
- use const char* instead of char* as needed in ObjC language runtime plugin - use int to iterate through enum (operator++ on enum not defined) - use initializer list instead of inline initialization of const field llvm-svn: 169185
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp5
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index 6342067bf50..6c848f94a83 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -752,9 +752,9 @@ LanguageTypeHelpTextCallback ()
StreamString sstr;
sstr << "One of the following languages:\n";
- for (LanguageType l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l)
+ for (unsigned int l = eLanguageTypeUnknown; l < eNumLanguageTypes; ++l)
{
- sstr << " " << LanguageRuntime::GetNameForLanguageType(l) << "\n";
+ sstr << " " << LanguageRuntime::GetNameForLanguageType(static_cast<LanguageType>(l)) << "\n";
}
sstr.Flush();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index fa34407644b..780d6506d18 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -727,7 +727,8 @@ public:
lldb::addr_t load_addr) :
m_process(process),
m_end_iterator(*this, -1ll),
- m_load_addr(load_addr)
+ m_load_addr(load_addr),
+ m_classheader_size(sizeof(int32_t) * 2)
{
lldb::addr_t cursor = load_addr;
@@ -946,7 +947,7 @@ private:
lldb_private::Process *m_process;
const_iterator m_end_iterator;
lldb::addr_t m_load_addr;
- const size_t m_classheader_size = (sizeof(int32_t) * 2);
+ const size_t m_classheader_size;
};
class ClassDescriptorV2 : public ObjCLanguageRuntime::ClassDescriptor
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
index bdbcf091da7..0c3c8b9655e 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
@@ -344,7 +344,7 @@ public:
while (*name_cursor != '\0')
{
- char *colon_loc = strchr(name_cursor, ':');
+ const char *colon_loc = strchr(name_cursor, ':');
if (!colon_loc)
{
selector_components.push_back(&ast_ctx.Idents.get(llvm::StringRef(name_cursor)));
OpenPOWER on IntegriCloud