-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
| Bugzilla Link | 9177 |
| Resolution | FIXED |
| Resolved on | Feb 15, 2011 19:41 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
Given
int attribute((visibility("hidden"))) foo (void);
extern __typeof (foo) foo asm ("INT_foo") attribute((visibility("hidden"))) ;
int foo (void) {
}
extern __typeof (foo) EXT_foo asm("foo") attribute((alias("INT_foo")));
Clang will produce
@"\01foo" = alias i32 ()* @INT_foo
define hidden i32 @"\01INT_foo"() nounwind {
entry:
%retval = alloca i32, align 4
%0 = load i32* %retval
ret i32 %0
}
declare i32 @INT_foo()
Note how we have a declaration for INT_foo and a definition for "\01INT_foo". This gets resolved by LLVM's codegen, but causes problems to LTO because the alias foo is pointing to a declaration.
Producing
@"\01foo" = alias i32 ()* @"\01INT_foo"
define hidden i32 @"\01INT_foo"() nounwind {
entry:
%retval = alloca i32, align 4
%0 = load i32* %retval
ret i32 %0
}
would fix the problem.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.