[clang] [CIR] Upstream simple function bodies (PR #127674)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 12:00:32 PST 2025
================
@@ -78,16 +82,37 @@ class CIRGenModule : public CIRGenTypeCache {
void emitTopLevelDecl(clang::Decl *decl);
+ /// Return the address of the given function. If funcType is non-null, then
+ /// this function will use the specified type if it has to create it.
+ // TODO: this is a bit weird as `GetAddr` given we give back a FuncOp?
----------------
andykaylor wrote:
Both the function name and the comment seem to be wrong. Both appear to be taken from the clang LLVM IR codegen. Should we fix this now? The LLVM IR codegen equivalent returns an `llvm::Constant*` which effectively an address. I'm not sure the same can be said for cir::FuncOp. On the other hand, renaming this will make it difficult to find for anyone porting code from the classic clang codegen.
https://github.com/llvm/llvm-project/pull/127674
More information about the cfe-commits
mailing list