[llvm-commits] CVS: llvm/include/llvm/GlobalValue.h
Anton Korobeynikov
asl at math.spbu.ru
Thu Sep 14 11:24:04 PDT 2006
Changes in directory llvm/include/llvm:
GlobalValue.h updated: 1.27 -> 1.28
---
Log message:
Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.
---
Diffs of the changes: (+17 -11)
GlobalValue.h | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.27 llvm/include/llvm/GlobalValue.h:1.28
--- llvm/include/llvm/GlobalValue.h:1.27 Fri Nov 11 18:09:49 2005
+++ llvm/include/llvm/GlobalValue.h Thu Sep 14 13:23:26 2006
@@ -28,12 +28,15 @@
GlobalValue(const GlobalValue &); // do not implement
public:
enum LinkageTypes {
- ExternalLinkage, /// Externally visible function
- LinkOnceLinkage, /// Keep one copy of named function when linking (inline)
- WeakLinkage, /// Keep one copy of named function when linking (weak)
- AppendingLinkage, /// Special purpose, only applies to global arrays
- InternalLinkage, /// Rename collisions when linking (static functions)
- GhostLinkage /// Stand-in functions for streaming fns from BC files
+ ExternalLinkage, /// Externally visible function
+ LinkOnceLinkage, /// Keep one copy of named function when linking (inline)
+ WeakLinkage, /// Keep one copy of named function when linking (weak)
+ AppendingLinkage, /// Special purpose, only applies to global arrays
+ InternalLinkage, /// Rename collisions when linking (static functions)
+ DLLImportLinkage, /// Function to be imported from DLL
+ DLLExportLinkage, /// Function to be accessible from DLL
+ ExternalWeakLinkage, /// TBD: ExternalWeak linkage description
+ GhostLinkage /// Stand-in functions for streaming fns from BC files
};
protected:
GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps,
@@ -72,11 +75,14 @@
return reinterpret_cast<const PointerType*>(User::getType());
}
- bool hasExternalLinkage() const { return Linkage == ExternalLinkage; }
- bool hasLinkOnceLinkage() const { return Linkage == LinkOnceLinkage; }
- bool hasWeakLinkage() const { return Linkage == WeakLinkage; }
- bool hasAppendingLinkage() const { return Linkage == AppendingLinkage; }
- bool hasInternalLinkage() const { return Linkage == InternalLinkage; }
+ bool hasExternalLinkage() const { return Linkage == ExternalLinkage; }
+ bool hasLinkOnceLinkage() const { return Linkage == LinkOnceLinkage; }
+ bool hasWeakLinkage() const { return Linkage == WeakLinkage; }
+ bool hasAppendingLinkage() const { return Linkage == AppendingLinkage; }
+ bool hasInternalLinkage() const { return Linkage == InternalLinkage; }
+ bool hasDLLImportLinkage() const { return Linkage == DLLImportLinkage; }
+ bool hasDLLExportLinkage() const { return Linkage == DLLExportLinkage; }
+ bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
void setLinkage(LinkageTypes LT) { Linkage = LT; }
LinkageTypes getLinkage() const { return Linkage; }
More information about the llvm-commits
mailing list