This revision was automatically updated to reflect the committed changes.
Closed by commit rG153dadf3a3ca: [clang] CodeGen: Make getOrEmitProtocol public
for Swift (authored by aschwaighofer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77077/new/
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Thanks, LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77077/new/
https://reviews.llvm.org/D77077
__
aschwaighofer marked an inline comment as done.
aschwaighofer added inline comments.
Comment at: clang/lib/CodeGen/CGObjCRuntime.h:217
+ /// ProtocolPtrTy.
+ virtual llvm::Constant *GetOrEmitProtocol(const ObjCProtocolDecl *PD) = 0;
+
rjmccall wrote:
> aschwaig
aschwaighofer updated this revision to Diff 254171.
aschwaighofer added a comment.
- Implement for the GNU runtimes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77077/new/
https://reviews.llvm.org/D77077
Files:
clang/include/clang/CodeGen/CodeG
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGObjCRuntime.h:217
+ /// ProtocolPtrTy.
+ virtual llvm::Constant *GetOrEmitProtocol(const ObjCProtocolDecl *PD) = 0;
+
aschwaighofer wrote:
> aschwaighofer wrote:
> > rjmccall wrote:
> > > Can this
aschwaighofer marked an inline comment as done.
aschwaighofer added inline comments.
Comment at: clang/lib/CodeGen/CGObjCRuntime.h:217
+ /// ProtocolPtrTy.
+ virtual llvm::Constant *GetOrEmitProtocol(const ObjCProtocolDecl *PD) = 0;
+
aschwaighofer wrote:
> rjm
aschwaighofer marked an inline comment as done.
aschwaighofer added inline comments.
Comment at: clang/lib/CodeGen/CGObjCRuntime.h:217
+ /// ProtocolPtrTy.
+ virtual llvm::Constant *GetOrEmitProtocol(const ObjCProtocolDecl *PD) = 0;
+
rjmccall wrote:
> Can this
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGObjCGNU.cpp:623
+llvm_unreachable("not implemented");
+ }
+
I think this is just the (unfortunately-named) `GenerateProtocolRef` (the one
that just takes a protocol and not a CGF).
==
aschwaighofer marked an inline comment as done.
aschwaighofer added inline comments.
Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:148
+ llvm::function_ref
+ createProtocolReference);
} // end namespace CodeGen
rj
aschwaighofer updated this revision to Diff 253938.
aschwaighofer added a comment.
- Remove callback. Swift can inspect the generated IR and update it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77077/new/
https://reviews.llvm.org/D77077
Files:
rjmccall added inline comments.
Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:148
+ llvm::function_ref
+ createProtocolReference);
} // end namespace CodeGen
aschwaighofer wrote:
> rjmccall wrote:
> > I would call
aschwaighofer updated this revision to Diff 253712.
aschwaighofer added a comment.
- Change API name to emitObjCProtocolObject.
- Make stuff compile on current ToT.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77077/new/
https://reviews.llvm.org/D
aschwaighofer marked an inline comment as done.
aschwaighofer added inline comments.
Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:148
+ llvm::function_ref
+ createProtocolReference);
} // end namespace CodeGen
rj
aschwaighofer added a comment.
> Can you explain the need for the callback? Are you expecting to use this for
> Swift-declared protocols by synthesizing an ObjC protocol declaration for
> them? I can see why you'd need a callback in that case.
The objective C protocol references other protocols
rjmccall added inline comments.
Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:148
+ llvm::function_ref
+ createProtocolReference);
} // end namespace CodeGen
I would call this `emitObjCProtocolObject` or something
aschwaighofer created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Swift would like to use clang's abis to emit protocol declarations.
It needs to a hook to register when inherited protocols are emitted.
This commits adds the public API:
emitProtocolDecl
16 matches
Mail list logo