[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 11 15:29:58 PST 2021
jkorous accepted this revision.
jkorous added a comment.
LGTM if we have test coverage for all the cases.
================
Comment at: clang/test/CodeGenObjC/category-class-empty.m:1
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -O3 -emit-llvm -o - %s | FileCheck %s
+// PR7431
----------------
zoecarver wrote:
> Is `-O3` needed here?
I would even think `-O0` is better and consider also `-disable-llvm-passes`. Ultimately the goal is to make sure frontend codegen doesn't emit the metadata so the less processing of the IR in the backend the more sensitive the test will be.
================
Comment at: clang/test/CodeGenObjC/category-class-empty.m:10
+ at interface A(foo)
+- (void)foo_myStuff;
+ at end
----------------
I assume all the cases when we want to emit the metadata (at least one instance method, at least one class method, ...) are covered by other tests, right?
If there's a case that's missing we should add a test for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113455/new/
https://reviews.llvm.org/D113455
More information about the cfe-commits
mailing list