diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 03:18:06 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 03:18:06 +0000 |
commit | 71183b6739707a34464187adf1d7df8848415fe5 (patch) | |
tree | b7bd2cf8d1c8bdd828327ce015c3202b572e0de7 /llvm/include/llvm-c/Core.h | |
parent | e31cd5b564d48240788dcd6b721236b6adc7e0fe (diff) | |
download | bcm5719-llvm-71183b6739707a34464187adf1d7df8848415fe5.tar.gz bcm5719-llvm-71183b6739707a34464187adf1d7df8848415fe5.zip |
Adding a collector name attribute to Function in the IR. These
methods are new to Function:
bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();
The assembly representation is as such:
define void @f() gc "shadow-stack" { ...
The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.
llvm-svn: 44769
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index a9228bcfc30..d3308eff638 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -339,6 +339,8 @@ LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index); unsigned LLVMGetIntrinsicID(LLVMValueRef Fn); unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn); void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC); +const char *LLVMGetCollector(LLVMValueRef Fn); +void LLVMSetCollector(LLVMValueRef Fn, const char *Coll); /* Operations on basic blocks */ LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef Bb); |