diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-30 20:08:39 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-30 20:08:39 +0000 |
commit | 5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9 (patch) | |
tree | 7207871f6b243dd1575dd474b14ed7e05be6b9e7 /include | |
parent | 2574fe5a226e9806cde064b0919c461babc3bf29 (diff) | |
download | llvm-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')
-rw-r--r-- | include/llvm/Function.h | 8 | ||||
-rw-r--r-- | include/llvm/GlobalValue.h | 6 | ||||
-rw-r--r-- | include/llvm/GlobalVariable.h | 11 |
3 files changed, 12 insertions, 13 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 803e5e8dec..f2a56ac17d 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 5b6431837b..b2c9acdaf9 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 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 |