From: Anton Korobeynikov Date: Mon, 30 Mar 2009 17:38:00 +0000 (+0000) Subject: Clearify local/global relocations wording X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ca6234944c9d01a549f5ccb1b442ae9fc4f0e012;p=oota-llvm.git Clearify local/global relocations wording git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68037 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 6025a70a885..d4949d1a0ff 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -19,6 +19,13 @@ namespace llvm { template 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. namespace Reloc { const unsigned None = 0; const unsigned Local = 1 << 0; ///< Local relocations are required @@ -70,7 +77,9 @@ public: bool canTrap() const; /// ContainsRelocations - Return true if the constant value contains - /// relocations which cannot be resolved at compile time. + /// relocations which cannot be resolved at compile time. Note that answer is + /// not exclusive: there can be possibility that relocations of other kind are + /// required as well. bool ContainsRelocations(unsigned Kind = Reloc::LocalOrGlobal) const; // Specialize get/setOperand for Constants as their operands are always