[PATCH] CodeGen: Emit some functions as weak_odr under -fms-extensions
David Majnemer
david.majnemer at gmail.com
Wed Apr 2 16:04:04 PDT 2014
================
Comment at: test/CodeGenCXX/inline-functions.cpp:119-124
@@ +118,7 @@
+
+struct TypeWithInlineMethods {
+ // CHECK-NOT: _ZN21TypeWithInlineMethods9StaticFunEv
+ static void StaticFun() {}
+ // CHECK-NOT: _ZN21TypeWithInlineMethods12NonStaticFunEv
+ void NonStaticFun() { StaticFun(); }
+};
----------------
Richard Smith wrote:
> Does MS allow this sort of thing:
>
> struct Foo {
> void bar() {}
> };
> extern void Foo::bar();
>
> ?
Nope:
> error C2761: 'void Foo::bar(void)' : member function redeclaration not allowed
================
Comment at: lib/AST/Decl.cpp:2619-2621
@@ -2587,5 +2618,5 @@
///
/// Specifically, this determines if adding the current declaration to the set
/// of redeclarations of the given functions causes
/// isInlineDefinitionExternallyVisible to change from false to true.
bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const {
----------------
Richard Smith wrote:
> This comment is incorrect; please fix it. Maybe s/Specifically/For instance, for functions using C99 or GNU inline rules/?
Wiil do!
http://llvm-reviews.chandlerc.com/D3207
BRANCH
master
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list