Merge pull request #922 from jbrodman/windll
Add DLL storage class for export functions on windows
This commit is contained in:
@@ -906,6 +906,13 @@ Module::AddFunctionDeclaration(const std::string &name,
|
||||
llvm::Function::Create(llvmFunctionType, linkage, functionName.c_str(),
|
||||
module);
|
||||
|
||||
#ifdef ISPC_IS_WINDOWS
|
||||
// Make export functions callable from DLLS.
|
||||
if (functionType->isExported) {
|
||||
function->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set function attributes: we never throw exceptions
|
||||
function->setDoesNotThrow();
|
||||
if (storageClass != SC_EXTERN_C &&
|
||||
|
||||
Reference in New Issue
Block a user