[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-23 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. In https://reviews.llvm.org/D50144#1209758, @smeenai wrote: > I'm confused by the funclet-based unwinding support. Do you intend GNUStep to > be used with windows-msvc triples? If so, how is the runtime throwing > exceptions? We took the approach of having the Obj-C ru

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1276 +InitVar->setSection(".CRT$XCLa"); +CGM.addUsedGlobal(InitVar); + } mstorsjo wrote: > rjmccall wrote: > > DHowett-MSFT wrote: > > > rjmccall wrote: > > > > Is the priority system not go

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a subscriber: rnk. smeenai added a comment. Sorry for the belated response; I was on vacation. I'm confused by the funclet-based unwinding support. Do you intend GNUStep to be used with windows-msvc triples? If so, how is the runtime throwing exceptions? We took the approach of ha

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-16 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; smeenai wrote: > theraven wrote:

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-15 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; theraven wrote: > compnerd wrote:

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-15 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; compnerd wrote: > DHowett-MSFT w

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; DHowett-MSFT wrote: > I'm intere

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-10 Thread David Chisnall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339428: Add Windows support for the GNUstep Objective-C ABI V2. (authored by theraven, committed by ). Changed prior to commit: https://reviews.llvm.org/D50144?vs=160091&id=160095#toc Repository: rC

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-10 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 160091. theraven added a comment. Squashed into a single commit. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle.cpp lib/CodeGen/CGException.cpp lib/CodeGen/CGObjCGNU.cpp lib/

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-09 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM. Comment at: lib/CodeGen/CGObjCGNU.cpp:915 +return name; + } /// The GCC ABI superclass message lookup function. Takes a pointer to a theraven wrote: > rjmccall wrote: > > theraven wrote:

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-09 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159887. theraven added a comment. - Address Dustin's review comments. - Fix an issue in protocol generation. - Fix failing test. - Address rjmcall's review comments. - Add some missing comments and factor out SEH check. Repository: rC Clang https://revie

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-09 Thread David Chisnall via Phabricator via cfe-commits
theraven marked an inline comment as done. theraven added a comment. I believe that this is now ready to land. Comment at: lib/CodeGen/CGObjCGNU.cpp:915 +return name; + } /// The GCC ABI superclass message lookup function. Takes a pointer to a rjmccall

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-09 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159868. theraven added a comment. - Address rjmcall's review comments. - Revert blocks part of the patch to put in a separate review. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:3542 + allSelectors.push_back(entry.first); +std::sort(allSelectors.begin(), allSelectors.end()); mgrang wrote: > Please use llvm::sort instead of std::sort. See > https://llvm.org/

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:3542 + allSelectors.push_back(entry.first); +std::sort(allSelectors.begin(), allSelectors.end()); Please use llvm::sort instead of std::sort. See https://llvm.org/docs/CodingStandards

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1262 + if (IsWindows) { +auto *Init = llvm::Function::Create(llvm::FunctionType::get(CGM.VoidTy, + {}), llvm::GlobalValue::InternalLinkage, ".block_isa_init", rjmccall wrote: > the

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159653. theraven added a comment. - Revert blocks part of the patch to put in a separate review. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle.cpp lib/CodeGen/CGException.cpp

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159651. theraven marked 2 inline comments as done. theraven added a comment. Herald added a subscriber: mgrang. - Address Dustin's review comments. - Fix an issue in protocol generation. - Fix failing test. - [gnu-objc] Make selector order deterministic. - Ad

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1276 +InitVar->setSection(".CRT$XCLa"); +CGM.addUsedGlobal(InitVar); + } rjmccall wrote: > DHowett-MSFT wrote: > > rjmccall wrote: > > > Is the priority system not good enough? > > My r

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-08 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1276 +InitVar->setSection(".CRT$XCLa"); +CGM.addUsedGlobal(InitVar); + } DHowett-MSFT wrote: > rjmccall wrote: > > Is the priority system not good enough? > My reading of the LLVM langu

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-07 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1276 +InitVar->setSection(".CRT$XCLa"); +CGM.addUsedGlobal(InitVar); + } rjmccall wrote: > Is the priority system not good enough? My reading of the LLVM language reference leads me

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:448 mangleVariableEncoding(VD); - else + else if (!isa(D)) llvm_unreachable("Tried to mangle unexpected NamedDecl!"); I don't think we want `ObjCInterfaceDecl`s to enter this func

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-07 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. I'd like to commit this, unless @rjmccall has any objections. Repository: rC Clang https://reviews.llvm.org/D50144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-06 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159312. theraven added a comment. - Fix failing test. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGException.cpp lib/CodeGen/CGOb

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-06 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 159293. theraven added a comment. - Fix an issue in protocol generation. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGException.cpp

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-06 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: include/clang/Driver/Options.td:1491 // Objective-C ABI options. -def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group, Flags<[CC1Option]>, +def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group, Flags<[CC1Option, Co

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-03 Thread David Chisnall via Phabricator via cfe-commits
theraven updated this revision to Diff 158997. theraven added a comment. - Address Dustin's review comments. Repository: rC Clang https://reviews.llvm.org/D50144 Files: include/clang/Driver/Options.td lib/AST/MicrosoftMangle.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGException.cpp

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-02 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added a subscriber: smeenai. DHowett-MSFT added inline comments. Comment at: include/clang/Driver/Options.td:1491 // Objective-C ABI options. -def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group, Flags<[CC1Option]>, +def fobjc_runtime_EQ : Joined<["-"], "

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-01 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT accepted this revision. DHowett-MSFT added a comment. This revision is now accepted and ready to land. This looks good to me, but I don't have a strong understanding of "outlining." Comment at: lib/CodeGen/CGBlocks.cpp:1262 + if (IsWindows) { +auto *Init = llv

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-01 Thread David Chisnall via Phabricator via cfe-commits
theraven created this revision. theraven added reviewers: rjmccall, DHowett-MSFT. Herald added a subscriber: cfe-commits. Introduces funclet-based unwinding for Objective-C and fixes an issue where global blocks can't have their isa pointers initialised on Windows. After discussion with Dustin, t