[Lldb-commits] [lldb] r248429 - The Visual Studio compiler does not like this C-ism when 'enum class'es are involved

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 23 14:36:48 PDT 2015


> On Sep 23, 2015, at 2:31 PM, Zachary Turner <zturner at google.com> wrote:
> 
> If you change "enum" to "enum class" I think it will work

Yes that would also work

> (IANALL but I think it's even more correct). 

IANALL either, but I beg to differ on that
The way I usually heard it explained is that C has different “namespaces” (*) where it puts structs, vs. enums, vs. typedefs, and that is why you need to classify names with the kind of type they are - or make typedefs for them
(*) not in the C++ sense of the term, in the sense of bucket where the compiler would go look for a type given a typename
In C++ all kinds of types all live in common buckets, so the classification is redundant, but allowed, because C

> But if what you've done works, then that should be fine.

I haven’t heard any more rumbling from the bot. I’ll take that as approval of my patch :-)

> 
> On Wed, Sep 23, 2015 at 1:50 PM Enrico Granata via lldb-commits <lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>> wrote:
> Author: enrico
> Date: Wed Sep 23 15:49:15 2015
> New Revision: 248429
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=248429&view=rev <http://llvm.org/viewvc/llvm-project?rev=248429&view=rev>
> Log:
> The Visual Studio compiler does not like this C-ism when 'enum class'es are involved
> 
> 
> Modified:
>     lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> 
> Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248429&r1=248428&r2=248429&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248429&r1=248428&r2=248429&view=diff>
> ==============================================================================
> --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (original)
> +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h Wed Sep 23 15:49:15 2015
> @@ -105,7 +105,7 @@ protected:
>      static bool
>      AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
> 
> -    static enum ObjCRuntimeVersions
> +    static ObjCRuntimeVersions
>      GetObjCVersion (Process *process, lldb::ModuleSP &objc_module_sp);
> 
>      void
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits>


Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150923/ba709857/attachment.html>


More information about the lldb-commits mailing list