Added ImmutableMap constructor that accepts a const TreeTy*.
[oota-llvm.git] / include / llvm / GlobalValue.h
index b13a122e1a396d0f61e94e95755fcbdd735bda88..6b6610b724f0dde6dbbf77edc9ea1a90e8e4dda6 100644 (file)
@@ -110,6 +110,19 @@ public:
   void setLinkage(LinkageTypes LT) { Linkage = LT; }
   LinkageTypes getLinkage() const { return Linkage; }
 
+  /// isWeakForLinker - Determines if symbol is weak for linker having weak or
+  /// linkonce or common or extweak LLVM linkage.
+  bool isWeakForLinker() const {
+    return (Linkage == WeakLinkage ||
+            Linkage == LinkOnceLinkage ||
+            Linkage == CommonLinkage ||
+            Linkage == ExternalWeakLinkage);
+  }
+
+  /// copyAttributesFrom - copy all additional attributes (those not needed to
+  /// create a GlobalValue) from the GlobalValue Src to this one.
+  virtual void copyAttributesFrom(const GlobalValue *Src);
+
   /// hasNotBeenReadFromBitcode - If a module provider is being used to lazily
   /// stream in functions from disk, this method can be used to check to see if
   /// the function has been read in yet or not.  Unless you are working on the