aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Function.h8
-rw-r--r--include/llvm/GlobalValue.h6
-rw-r--r--include/llvm/GlobalVariable.h11
3 files changed, 12 insertions, 13 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 803e5e8..f2a56ac 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -89,11 +89,11 @@ public:
/// arguments.
bool isVarArg() const;
- /// isExternal - Is the body of this function unknown? (The basic block list
- /// is empty if so.) This is true for external functions, defined as forward
- /// "declare"ations
+ /// isDeclaration - Is the body of this function unknown? (The basic block
+ /// list is empty if so.) This is true for function declarations, but not
+ /// true for function definitions.
///
- virtual bool isExternal() const { return BasicBlocks.empty(); }
+ virtual bool isDeclaration() const { return BasicBlocks.empty(); }
/// getIntrinsicID - This method returns the ID number of the specified
/// function, or Intrinsic::not_intrinsic if the function is not an
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 5b64318..b2c9acd 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -113,9 +113,9 @@ public:
/// Override from Constant class.
virtual void destroyConstant();
- /// isExternal - Return true if the primary definition of this global value is
- /// outside of the current translation unit...
- virtual bool isExternal() const = 0;
+ /// isDeclaration - Return true if the primary definition of this global
+ /// value is outside of the current translation unit...
+ virtual bool isDeclaration() const = 0;
/// getParent - Get the module that this global value is contained inside
/// of...
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