aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Function.h4
-rw-r--r--include/llvm/GlobalValue.h4
-rw-r--r--include/llvm/GlobalVariable.h4
3 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 5dd8502d3a..ef82457926 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -204,6 +204,10 @@ public:
return paramHasAttr(1, ParamAttr::StructRet);
}
+ /// copyAttributesFrom - copy all additional attributes (those not needed to
+ /// create a Function) from the Function Src to this one.
+ void copyAttributesFrom(const GlobalValue *Src);
+
/// deleteBody - This method deletes the body of the function, and converts
/// the linkage to external.
///
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index b13a122e1a..bc0c0a7937 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -110,6 +110,10 @@ public:
void setLinkage(LinkageTypes LT) { Linkage = LT; }
LinkageTypes getLinkage() const { return Linkage; }
+ /// 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
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index ac72b77e76..a578cd1c09 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -118,6 +118,10 @@ public:
bool isThreadLocal() const { return isThreadLocalSymbol; }
void setThreadLocal(bool Val) { isThreadLocalSymbol = Val; }
+ /// copyAttributesFrom - copy all additional attributes (those not needed to
+ /// create a GlobalVariable) from the GlobalVariable Src to this one.
+ void copyAttributesFrom(const GlobalValue *Src);
+
/// removeFromParent - This method unlinks 'this' from the containing module,
/// but does not delete it.
///