Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.

llvm-svn: 96992
This commit is contained in:
Rafael Espindola
2010-02-23 22:00:30 +00:00
parent da52f449a0
commit c18086ae17
11 changed files with 144 additions and 13 deletions

View File

@@ -1327,6 +1327,7 @@ void CodeGenModule::EmitAliasDefinition(const ValueDecl *D) {
GA->setLinkage(llvm::Function::DLLExportLinkage);
}
} else if (D->hasAttr<WeakAttr>() ||
D->hasAttr<WeakRefAttr>() ||
D->hasAttr<WeakImportAttr>()) {
GA->setLinkage(llvm::Function::WeakAnyLinkage);
}