tromey wrote:

> As a note - when you say "at the CU scope" do you mean a direct child of the 
> CU, or anything outside a function or class definition? (ie: could be inside 
> a namespace) - Clang puts definitions, I think, in the namespace nearest the 
> declaration for the definition - compare these: 
> https://godbolt.org/z/EoK4noe7o

Outside of function bodies is probably good enough.

For me conceptually the vtable is an artificial global, but I could understand 
wanting it to be in a namespace or whatever.

And really if one were going that route, having the vtable object be a 
function-scoped static would also make sense.  It's just that this incurs a new 
cost on the debuginfo reader -- but not for any deep source-related reason, 
because these aren't source-accessible objects anyway.


https://github.com/llvm/llvm-project/pull/130255
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to