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 /lib/Bytecode | |
parent | 2574fe5a226e9806cde064b0919c461babc3bf29 (diff) |
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 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Reader/ReaderWrappers.cpp | 4 | ||||
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp index 2c5b8067bd..934869e71f 100644 --- a/lib/Bytecode/Reader/ReaderWrappers.cpp +++ b/lib/Bytecode/Reader/ReaderWrappers.cpp @@ -298,13 +298,13 @@ bool llvm::GetBytecodeDependentLibraries(const std::string &fname, static void getSymbols(Module*M, std::vector<std::string>& symbols) { // Loop over global variables for (Module::global_iterator GI = M->global_begin(), GE=M->global_end(); GI != GE; ++GI) - if (!GI->isExternal() && !GI->hasInternalLinkage()) + if (!GI->isDeclaration() && !GI->hasInternalLinkage()) if (!GI->getName().empty()) symbols.push_back(GI->getName()); // Loop over functions. for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI) - if (!FI->isExternal() && !FI->hasInternalLinkage()) + if (!FI->isDeclaration() && !FI->hasInternalLinkage()) if (!FI->getName().empty()) symbols.push_back(FI->getName()); } diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index a81f41efdd..0d4ccbddd6 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -1030,12 +1030,12 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { unsigned CC = I->getCallingConv()+1; unsigned ID = (Slot << 5) | (CC & 15); - if (I->isExternal()) // If external, we don't have an FunctionInfo block. + if (I->isDeclaration()) // If external, we don't have an FunctionInfo block. ID |= 1 << 4; if (I->getAlignment() || I->hasSection() || (CC & ~15) != 0 || - (I->isExternal() && I->hasDLLImportLinkage()) || - (I->isExternal() && I->hasExternalWeakLinkage()) + (I->isDeclaration() && I->hasDLLImportLinkage()) || + (I->isDeclaration() && I->hasExternalWeakLinkage()) ) ID |= 1 << 31; // Do we need an extension word? @@ -1046,7 +1046,7 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { // convention, bit 10 = hasSectionID., bits 11-12 = external linkage type unsigned extLinkage = 0; - if (I->isExternal()) { + if (I->isDeclaration()) { if (I->hasDLLImportLinkage()) { extLinkage = 1; } else if (I->hasExternalWeakLinkage()) { @@ -1103,7 +1103,7 @@ void BytecodeWriter::outputInstructions(const Function *F) { void BytecodeWriter::outputFunction(const Function *F) { // If this is an external function, there is nothing else to emit! - if (F->isExternal()) return; + if (F->isDeclaration()) return; BytecodeBlock FunctionBlock(BytecodeFormat::FunctionBlockID, *this); unsigned rWord = (getEncodedVisibility(F) << 16) | getEncodedLinkage(F); |