[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

Reid Spencer reid at x10sys.com
Tue Jan 30 12:10:10 PST 2007



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.154 -> 1.155
---
Log message:

For PR1136: http://llvm.org/PR1136 : Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


---
Diffs of the changes:  (+5 -5)

 Writer.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.154 llvm/lib/Bytecode/Writer/Writer.cpp:1.155
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.154	Tue Jan 30 13:36:46 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Tue Jan 30 14:08:37 2007
@@ -1030,12 +1030,12 @@
     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 @@
       // 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::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);






More information about the llvm-commits mailing list