aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-15 23:20:19 +0000
committerChris Lattner <sabre@nondot.org>2004-11-15 23:20:19 +0000
commit1840f3ce7ff4688452e57d2924eb8c00157f02b4 (patch)
treeab022225d6fb5684739c38d0e16b7a7d19ebe6cc
parent02376e3f29fd393d2e36a2e3bb682bdcecb1c8ab (diff)
Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17865 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/GlobalValue.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 5b2c546a01..12863a2c13 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -67,8 +67,15 @@ public:
void setLinkage(LinkageTypes LT) { Linkage = LT; }
LinkageTypes getLinkage() const { return Linkage; }
- /// Override from Constant class. No GlobalValue's have null values so
- /// this always returns false.
+ /// hasNotBeenReadFromBytecode - If a module provider is being used to lazily
+ /// stream in functions from disk, this method can be used to check to see if
+ /// the function has been read in yet or not. Unless you are working on the
+ /// JIT or something else that streams stuff in lazily, you don't need to
+ /// worry about this.
+ bool hasNotBeenReadFromBytecode() const { return Linkage == GhostLinkage; }
+
+ /// Override from Constant class. No GlobalValue's are null values so this
+ /// always returns false.
virtual bool isNullValue() const { return false; }
/// Override from Constant class.