[Lldb-commits] [PATCH] D19092: Fix Android build after r266267
granata.enrico resigned from this revision. granata.enrico removed a reviewer: granata.enrico. granata.enrico added a comment. I am not an Apple employee working on LLDB anymore https://reviews.llvm.org/D19092 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19092: Fix Android build after r266267
labath added a subscriber: labath. labath added a comment. Judging by the cryptic error message, and the fact that a global variable should not cause an issue, i suspect stdout was a macro in this case... http://reviews.llvm.org/D19092 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19092: Fix Android build after r266267
> On Apr 14, 2016, at 10:56 AM, Oleksiy Vyalov via lldb-commits > wrote: > > ovyalov added a comment. > > In http://reviews.llvm.org/D19092#401450, @jingham wrote: > >> Why is this necessary? stdout is a local variable defined in this scope. >> Why would the android g++ have problems with this? >> >> Anyway, if you have to avoid using stdout as a name, maybe name it std_out >> as that better reflects its meaning. > > > My understanding that NDK toolchain exposes stdout global variable that is > caused name collision here. > That seems wrong - if stdout truly is just a global variable, the scoping rules should totally allow me to define a local by the same name Our (uneducated) guess is that stdout is defined to be a macro which expands to something that is not actually an identifier (which - at a glance - looks like it is not POSIX compliant) > > http://reviews.llvm.org/D19092 > > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits Thanks, - Enrico 📩 egranata@.com ☎️ 27683 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19092: Fix Android build after r266267
ovyalov added a comment. In http://reviews.llvm.org/D19092#401450, @jingham wrote: > Why is this necessary? stdout is a local variable defined in this scope. > Why would the android g++ have problems with this? > > Anyway, if you have to avoid using stdout as a name, maybe name it std_out as > that better reflects its meaning. My understanding that NDK toolchain exposes stdout global variable that is caused name collision here. http://reviews.llvm.org/D19092 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19092: Fix Android build after r266267
jingham added a subscriber: jingham. jingham added a comment. Why is this necessary? stdout is a local variable defined in this scope. Why would the android g++ have problems with this? Anyway, if you have to avoid using stdout as a name, maybe name it std_out as that better reflects its meaning. http://reviews.llvm.org/D19092 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19092: Fix Android build after r266267
ovyalov added a comment. Submitted as http://reviews.llvm.org/rL266274 http://reviews.llvm.org/D19092 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D19092: Fix Android build after r266267
ovyalov created this revision. ovyalov added a reviewer: granata.enrico. ovyalov added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. Fix Android build after r266267 http://reviews.llvm.org/D19092 Files: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -596,47 +596,47 @@ { auto iterators_pair = objc_runtime->GetDescriptorIteratorPair(); auto iterator = iterators_pair.first; -Stream &stdout(result.GetOutputStream()); +auto &out = result.GetOutputStream(); for(; iterator != iterators_pair.second; iterator++) { if (iterator->second) { const char* class_name = iterator->second->GetClassName().AsCString(""); if (regex_up && class_name && !regex_up->Execute(class_name)) continue; -stdout.Printf("isa = 0x%" PRIx64, iterator->first); -stdout.Printf(" name = %s", class_name); -stdout.Printf(" instance size = %" PRIu64, iterator->second->GetInstanceSize()); -stdout.Printf(" num ivars = %" PRIuPTR, (uintptr_t)iterator->second->GetNumIVars()); +out.Printf("isa = 0x%" PRIx64, iterator->first); +out.Printf(" name = %s", class_name); +out.Printf(" instance size = %" PRIu64, iterator->second->GetInstanceSize()); +out.Printf(" num ivars = %" PRIuPTR, (uintptr_t)iterator->second->GetNumIVars()); if (auto superclass = iterator->second->GetSuperclass()) { -stdout.Printf(" superclass = %s", superclass->GetClassName().AsCString("")); +out.Printf(" superclass = %s", superclass->GetClassName().AsCString("")); } -stdout.Printf("\n"); +out.Printf("\n"); if (m_options.m_verbose) { for(size_t i = 0; i < iterator->second->GetNumIVars(); i++) { auto ivar = iterator->second->GetIVarAtIndex(i); -stdout.Printf(" ivar name = %s type = %s size = %" PRIu64 " offset = %" PRId32 "\n", +out.Printf(" ivar name = %s type = %s size = %" PRIu64 " offset = %" PRId32 "\n", ivar.m_name.AsCString(""), ivar.m_type.GetDisplayTypeName().AsCString(""), ivar.m_size, ivar.m_offset); } iterator->second->Describe(nullptr, - [objc_runtime, &stdout] (const char* name, const char* type) -> bool { - stdout.Printf(" instance method name = %s type = %s\n", - name, - type); + [objc_runtime, &out] (const char* name, const char* type) -> bool { + out.Printf(" instance method name = %s type = %s\n", + name, + type); return false; }, - [objc_runtime, &stdout] (const char* name, const char* type) -> bool { - stdout.Printf(" class method name = %s type = %s\n", - name, - type); + [objc_runtime, &out] (const char* name, const char* type) -> bool { + out.Printf(" class method name = %s type = %s\n", + name, + type);