Index: include/llvm-c/Core.h =================================================================== --- include/llvm-c/Core.h +++ include/llvm-c/Core.h @@ -1921,6 +1921,13 @@ void LLVMSetGC(LLVMValueRef Fn, const char *Name); /** +* Link the Shadow Stack GC +* +* @see llvm::linkShadowStackGC() +*/ +void LLVMLinkShadowStackGC(); + +/** * Add an attribute to a function. * * @see llvm::Function::addAttribute() Index: lib/IR/Core.cpp =================================================================== --- lib/IR/Core.cpp +++ lib/IR/Core.cpp @@ -14,6 +14,7 @@ #include "llvm-c/Core.h" #include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/CodeGen/GCs.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/Constants.h" @@ -1709,6 +1710,10 @@ F->clearGC(); } +void LLVMLinkShadowStackGC() { + llvm::linkShadowStackGC(); +} + void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { Function *Func = unwrap(Fn); const AttributeSet PAL = Func->getAttributes();