summaryrefslogtreecommitdiff
path: root/include/llvm/GlobalVariable.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-30 20:08:39 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-30 20:08:39 +0000
commit5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9 (patch)
tree7207871f6b243dd1575dd474b14ed7e05be6b9e7 /include/llvm/GlobalVariable.h
parent2574fe5a226e9806cde064b0919c461babc3bf29 (diff)
downloadllvm-5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9.tar.gz
llvm-5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9.tar.bz2
llvm-5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9.tar.xz
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
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 5e31c6bd19..3bf82492bc 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