[llvm-commits] [llvm] r68037 - /llvm/trunk/include/llvm/Constant.h
Anton Korobeynikov
asl at math.spbu.ru
Mon Mar 30 10:38:00 PDT 2009
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.
namespace Reloc {
const unsigned None = 0;
const unsigned Local = 1 << 0; ///< Local relocations are required
@@ -70,7 +77,9 @@
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
More information about the llvm-commits
mailing list