<div dir="ltr">You also need to change the filename, the URL and the error message.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 2:43 PM Fangrui Song via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: maskray<br>
Date: Fri Dec 21 14:40:10 2018<br>
New Revision: 349969<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=349969&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=349969&view=rev</a><br>
Log:<br>
key method -> key function<br>
<br>
The latter is what is actually called in the ABI <a href="http://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-vtable" rel="noreferrer" target="_blank">http://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-vtable</a><br>
<br>
Pointed out by rsmith<br>
<br>
Modified:<br>
    lld/trunk/docs/Readers.rst<br>
    lld/trunk/docs/missingkeymethod.rst<br>
<br>
Modified: lld/trunk/docs/Readers.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Readers.rst?rev=349969&r1=349968&r2=349969&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Readers.rst?rev=349969&r1=349968&r2=349969&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/docs/Readers.rst (original)<br>
+++ lld/trunk/docs/Readers.rst Fri Dec 21 14:40:10 2018<br>
@@ -74,7 +74,7 @@ files in parallel. Therefore, there shou<br>
 object.  Any parsing state should be in ivars of your File subclass or in<br>
 some temporary object.<br>
<br>
-The key method to implement in a reader is::<br>
+The key function to implement in a reader is::<br>
<br>
   virtual error_code loadFile(LinkerInput &input,<br>
                               std::vector<std::unique_ptr<File>> &result);<br>
<br>
Modified: lld/trunk/docs/missingkeymethod.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/docs/missingkeymethod.rst?rev=349969&r1=349968&r2=349969&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/docs/missingkeymethod.rst?rev=349969&r1=349968&r2=349969&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/docs/missingkeymethod.rst (original)<br>
+++ lld/trunk/docs/missingkeymethod.rst Fri Dec 21 14:40:10 2018<br>
@@ -6,12 +6,12 @@ If your build failed with a linker error<br>
   foo.cc:28: error: undefined reference to 'vtable for C'<br>
   the vtable symbol may be undefined because the class is missing its key function (see <a href="https://lld.llvm.org/missingkeymethod" rel="noreferrer" target="_blank">https://lld.llvm.org/missingkeymethod</a>)<br>
<br>
-it's likely that your class C has a key method (defined by the ABI as the first<br>
+it's likely that your class C has a key function (defined by the ABI as the first<br>
 non-pure, non-inline, virtual method), but you haven't actually defined it.<br>
<br>
-When a class has a key method, the compiler emits the vtable (and some other<br>
-things as well) only in the translation unit that defines that key method. Thus,<br>
-if you're missing the key method, you'll also be missing the vtable. If no other<br>
+When a class has a key function, the compiler emits the vtable (and some other<br>
+things as well) only in the translation unit that defines that key function. Thus,<br>
+if you're missing the key function, you'll also be missing the vtable. If no other<br>
 function calls your missing method, you won't see any undefined reference errors<br>
 for it, but you will see undefined references to the vtable symbol.<br>
<br>
@@ -20,7 +20,7 @@ method, and the compiler is forced to em<br>
 that references the class. In this case, it is emitted in a COMDAT section,<br>
 which allows the linker to eliminate all duplicate copies. This is still<br>
 wasteful in terms of object file size and link time, so it's always advisable to<br>
-ensure there is at least one eligible method that can serve as the key method.<br>
+ensure there is at least one eligible method that can serve as the key function.<br>
<br>
 Here are the most common mistakes that lead to this error:<br>
<br>
@@ -42,8 +42,8 @@ not emit the vtable for ``B``, and you'l<br>
 for B".<br>
<br>
 This is just an example of the more general mistake of forgetting to define the<br>
-key method, but it's quite common because virtual destructors are likely to be<br>
-the first eligible key method and it's easy to forget to implement them. It's<br>
+key function, but it's quite common because virtual destructors are likely to be<br>
+the first eligible key function and it's easy to forget to implement them. It's<br>
 also more likely that you won't have any direct references to the destructor, so<br>
 you won't see any undefined reference errors that point directly to the problem.<br>
<br>
@@ -65,7 +65,7 @@ Say you have an abstract base class decl<br>
   };<br>
<br>
 This base class is intended to be abstract, but you forgot to mark one of the<br>
-methods pure. Here, ``A::bar``, being non-pure, is nominated as the key method,<br>
+methods pure. Here, ``A::bar``, being non-pure, is nominated as the key function,<br>
 and as a result, the vtable for ``A`` is not emitted, because the compiler is<br>
 waiting for a translation unit that defines ``A::bar``.<br>
<br>
@@ -75,10 +75,10 @@ The solution in this case is to add the<br>
 Key method is defined, but the linker doesn't see it<br>
 ----------------------------------------------------<br>
<br>
-It's also possible that you have defined the key method somewhere, but the<br>
+It's also possible that you have defined the key function somewhere, but the<br>
 object file containing the definition of that method isn't being linked into<br>
 your application.<br>
<br>
 The solution in this case is to check your dependencies to make sure that<br>
-the object file or the library file containing the key method is given to<br>
+the object file or the library file containing the key function is given to<br>
 the linker.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>