Key function
The virtual function whose definition decides which object file a C++ class's vtable ends up in.
A vtable has to live somewhere, and the C++ standard has nothing to say about where. The Itanium ABI picks the first virtual function in the class that is neither inline nor pure virtual. Whichever translation unit defines that function gets the vtable and the type information. If no such function exists, the vtable is emitted in every file that needs it, as a COMDAT section the linker later folds together.
The rule explains one of C++'s most baffling linker errors, undefined reference to `vtable for Foo'. It nearly always means the key function, often the destructor, was declared but never defined. LLVM's coding standards recommend an empty virtual anchor() method defined in a source file, precisely so the vtable doesn't get copied into every file that includes the header.