summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-03-30 17:38:00 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-03-30 17:38:00 +0000
commit1a7432742c9ce2ce2830f5d70c7e0abaab691a2b (patch)
treeeab9e9018b8621c2a788f5767b6d683a7b436325
parent56709fdffec7335d3a7bd0b5c3bf626f43a66586 (diff)
downloadbcm5719-llvm-1a7432742c9ce2ce2830f5d70c7e0abaab691a2b.tar.gz
bcm5719-llvm-1a7432742c9ce2ce2830f5d70c7e0abaab691a2b.zip
Clearify local/global relocations wording
llvm-svn: 68037
-rw-r--r--llvm/include/llvm/Constant.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/include/llvm/Constant.h b/llvm/include/llvm/Constant.h
index 6025a70a885..d4949d1a0ff 100644
--- a/llvm/include/llvm/Constant.h
+++ b/llvm/include/llvm/Constant.h
@@ -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 @@ 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
OpenPOWER on IntegriCloud