diff options
author | Reid Kleckner <rnk@google.com> | 2016-03-17 20:06:58 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-03-17 20:06:58 +0000 |
commit | 4084504caac224362f918a8b74a747dd8c1fdd0f (patch) | |
tree | 7bb752f4097adc7e1fa4e5f46e69705b54c827a6 /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | c5575aabd62d2dc6ad74d03d0b49cc40dcb19b1e (diff) | |
download | bcm5719-llvm-4084504caac224362f918a8b74a747dd8c1fdd0f.tar.gz bcm5719-llvm-4084504caac224362f918a8b74a747dd8c1fdd0f.zip |
Revert "For MS ABI, emit dllexport friend functions defined inline in class"
This reverts commit r263738.
This appears to cause a failure in
CXX/temp/temp.decls/temp.friend/p1.cpp
llvm-svn: 263740
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
-rw-r--r-- | clang/lib/CodeGen/ModuleBuilder.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index 14e6bc5b910..bd59332a274 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -143,22 +143,12 @@ namespace { DeferredInlineMethodDefinitions.clear(); } - void HandleInlineFunctionDefinition(FunctionDecl *D) override { + void HandleInlineMethodDefinition(CXXMethodDecl *D) override { if (Diags.hasErrorOccurred()) return; assert(D->doesThisDeclarationHaveABody()); - // Handle friend functions. - if (D->isInIdentifierNamespace(Decl::IDNS_OrdinaryFriend)) { - if (Ctx->getTargetInfo().getCXXABI().isMicrosoft()) - Builder->EmitTopLevelDecl(D); - return; - } - - // Otherwise, must be a method. - auto MD = cast<CXXMethodDecl>(D); - // We may want to emit this definition. However, that decision might be // based on computing the linkage, and we have to defer that in case we // are inside of something that will change the method's final linkage, @@ -167,13 +157,13 @@ namespace { // void bar(); // void foo() { bar(); } // } A; - DeferredInlineMethodDefinitions.push_back(MD); + DeferredInlineMethodDefinitions.push_back(D); // Provide some coverage mapping even for methods that aren't emitted. // Don't do this for templated classes though, as they may not be // instantiable. - if (!MD->getParent()->getDescribedClassTemplate()) - Builder->AddDeferredUnusedCoverageMapping(MD); + if (!D->getParent()->getDescribedClassTemplate()) + Builder->AddDeferredUnusedCoverageMapping(D); } /// HandleTagDeclDefinition - This callback is invoked each time a TagDecl |