[llvm-commits] [llvm] r68037 - /llvm/trunk/include/llvm/Constant.h

Dan Gohman gohman at apple.com
Mon Mar 30 11:49:16 PDT 2009


On Mar 30, 2009, at 10:38 AM, Anton Korobeynikov wrote:

> Author: asl
> Date: Mon Mar 30 12:38:00 2009
> New Revision: 68037
>
> URL: http://llvm.org/viewvc/llvm-project?rev=68037&view=rev
> Log:
> Clearify local/global relocations wording
>
> Modified:
>    llvm/trunk/include/llvm/Constant.h
>
> Modified: llvm/trunk/include/llvm/Constant.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=68037&r1=68036&r2=68037&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/Constant.h (original)
> +++ llvm/trunk/include/llvm/Constant.h Mon Mar 30 12:38:00 2009
> @@ -19,6 +19,13 @@
> namespace llvm {
>   template<typename T> class SmallVectorImpl;
>
> +  /// If object contains references to other objects, then  
> relocations are
> +  /// usually required for emission of such object (especially in  
> PIC mode). One
> +  /// usually distinguishes local and global relocations. Local  
> relocations are
> +  /// made wrt objects in the same module and these objects have  
> local (internal
> +  /// or private) linkage. Global relocations are made wrt  
> externally visible
> +  /// objects. In most cases local relocations can be resolved via  
> so-called
> +  /// 'pre-link' technique.

Thanks for adding this.

This is still a little unclear to me though, however it may
just be wording now.  The phrase "objects in the same
module" seems either redundant or contradictory.

The rest of the comment seems to support that it's
redundant. However, many optimizations that apply to
symbols with internal and private linkage also apply to
symbols with hidden or protected visibility and a
definition in the same module, so the intent here
isn't clear.

Thanks,

Dan




More information about the llvm-commits mailing list