forked from OSchip/llvm-project
Handle gnu_inline in c++ in a gcc compatible way. Original patch by Tobias
Grosser. llvm-svn: 165720
This commit is contained in:
parent
76831c6cd4
commit
fb9d4b4c3b
|
@ -193,7 +193,7 @@ static bool useInlineVisibilityHidden(const NamedDecl *D) {
|
|||
// anyway.
|
||||
return TSK != TSK_ExplicitInstantiationDeclaration &&
|
||||
TSK != TSK_ExplicitInstantiationDefinition &&
|
||||
FD->hasBody(Def) && Def->isInlined();
|
||||
FD->hasBody(Def) && Def->isInlined() && !Def->hasAttr<GNUInlineAttr>();
|
||||
}
|
||||
|
||||
static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D,
|
||||
|
|
|
@ -126,3 +126,12 @@ namespace test3 {
|
|||
// CHECK: define linkonce_odr hidden void @_ZN5test33fooEv
|
||||
// CHECK: define linkonce_odr hidden void @_ZN5test33zedIiEEvv
|
||||
}
|
||||
|
||||
namespace test4 {
|
||||
extern inline __attribute__ ((__gnu_inline__))
|
||||
void foo() {}
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
// CHECK: define available_externally void @_ZN5test43fooE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue