[PATCH] [DOCS] LangRef references undefined variable in sample code

Mikael Lyngvig mikael at lyngvig.org
Tue Dec 3 18:07:09 PST 2013


Yes, I supposed the .LC0 thing was a leftover from an ancient version of
the code sample.  Here's a patch that erases the entire paragraph:

Index: LangRef.rst
===================================================================
--- LangRef.rst (revision 196340)
+++ LangRef.rst (working copy)
@@ -291,12 +291,6 @@
     name is formed by combining ``__imp_`` and the function or variable
     name.

-For example, since the "``.LC0``" variable is defined to be internal, if
-another module defined a "``.LC0``" variable and was linked with this
-one, one of the two would be renamed, preventing a collision. Since
-"``main``" and "``puts``" are external (i.e., lacking any linkage
-declarations), they are accessible outside of the current module.
-
 It is illegal for a function *declaration* to have any linkage type
 other than ``external``, ``dllimport`` or ``extern_weak``.



-- Mikael


2013/12/4 Sean Silva <silvas at purdue.edu>

> This doesn't really help. The paragraph still doesn't make any sense.
> ("For example, ..."--- example of what?). I'm not sure what the right fix
> is. There does seem to be a code example just above in "Module Structure"
> that has `main` and `puts` though. The best thing is probably to just
> delete this paragraph.
>
> -- Sean Silva
>
>
> On Sun, Dec 1, 2013 at 12:57 PM, Mikael Lyngvig <mikael at lyngvig.org>wrote:
>
>> This patch basically rephrases the passage so that it does not reference
>> an undefined variable (probably some left-over from an ancient change):
>>
>> diff --git a/docs/LangRef.rst b/docs/LangRef.rst
>> index 810455c..e434431 100644
>> --- a/docs/LangRef.rst
>> +++ b/docs/LangRef.rst
>> @@ -291,9 +291,9 @@ symbols from (to) DLLs (Dynamic Link Libraries).
>>      name is formed by combining ``__imp_`` and the function or variable
>>      name.
>>
>> -For example, since the "``.LC0``" variable is defined to be internal, if
>> -another module defined a "``.LC0``" variable and was linked with this
>> -one, one of the two would be renamed, preventing a collision. Since
>> +For example, if the "``.LC0``" variable is defined to be internal and
>> +another module defines a "``.LC0``" variable and is linked with this
>> +one, one of the two will be renamed, preventing a collision. Since
>>  "``main``" and "``puts``" are external (i.e., lacking any linkage
>>  declarations), they are accessible outside of the current module.
>>
>>
>> -- Mikael
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131204/26fc80d8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LangRef.patch
Type: application/octet-stream
Size: 745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131204/26fc80d8/attachment.obj>


More information about the llvm-commits mailing list