Fix for issue #430

This commit is contained in:
Dmitry Babokin
2013-02-27 18:03:07 +04:00
parent 51fdff208e
commit 524939dc5b
4 changed files with 34 additions and 2 deletions

View File

@@ -785,6 +785,10 @@ Module::AddFunctionDeclaration(const std::string &name,
function->setDoesNotAlias(1);
#endif
#if !defined(LLVM_3_1) && !defined(LLVM_3_2)
function->addAttributes(llvm::AttributeSet::FunctionIndex, *g->target.tf_attributes);
#endif
// Make sure that the return type isn't 'varying' or vector typed if
// the function is 'export'ed.
if (functionType->isExported &&