aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/GlobalVariable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/GlobalVariable.h')
-rw-r--r--include/llvm/GlobalVariable.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index 5e31c6b..3bf8249 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -58,17 +58,16 @@ public:
Constant *Initializer, const std::string &Name,
GlobalVariable *InsertBefore);
- /// isExternal - Is this global variable lacking an initializer? If so, the
- /// global variable is defined in some other translation unit, and is thus
- /// externally defined here.
- ///
- virtual bool isExternal() const { return getNumOperands() == 0; }
+ /// isDeclaration - Is this global variable lacking an initializer? If so,
+ /// the global variable is defined in some other translation unit, and is thus
+ /// only a declaration here.
+ virtual bool isDeclaration() const { return getNumOperands() == 0; }
/// hasInitializer - Unless a global variable isExternal(), it has an
/// initializer. The initializer for the global variable/constant is held by
/// Initializer if an initializer is specified.
///
- inline bool hasInitializer() const { return !isExternal(); }
+ inline bool hasInitializer() const { return !isDeclaration(); }
/// getInitializer - Return the initializer for this global variable. It is
/// illegal to call this method if the global is external, because we cannot