In MCAsmStreamer:
.type foo,@function # <--- this is redundant
.type foo,@gnu_indirect_function
In MCELFStreamer, the latter STT_GNU_IFUNC overrides STT_FUNC.
llvm-svn: 368823
// Set the symbol type to function if the alias has a function type.
// This affects codegen when the aliasee is not a function.
- if (IsFunction) {
- OutStreamer->EmitSymbolAttribute(Name, MCSA_ELF_TypeFunction);
- if (isa<GlobalIFunc>(GIS))
- OutStreamer->EmitSymbolAttribute(Name, MCSA_ELF_TypeIndFunction);
- }
+ if (IsFunction)
+ OutStreamer->EmitSymbolAttribute(Name, isa<GlobalIFunc>(GIS)
+ ? MCSA_ELF_TypeIndFunction
+ : MCSA_ELF_TypeFunction);
EmitVisibility(Name, GIS.getVisibility());
; CHECK-NEXT: foo_ifunc:
@foo = ifunc i32 (i32), i64 ()* @foo_ifunc
-; CHECK: .type foo,@function
-; CHECK-NEXT: .type foo,@gnu_indirect_function
+; CHECK: .type foo,@gnu_indirect_function
; CHECK-NEXT: .set foo, foo_ifunc