mirror-llvm-project/clang/test/CodeGenObjC
Nikita Popov fcfc9167b6
Reapply [IR] Explicitly specify target feature for module asm (#204548) (#207677)
Reapply with a use-after-free fix. The MC subtarget used for inline
assembly has to stay alive until finalization, not only during the
emitInlineAsm() call.

-----

Support specifying additional properties on module-level inline
assembly. In particular, the target features and target CPU can now be
specified as follows:

    module asm(target_features: "+foo", target_cpu: "bar")
        "asm line 1"
        "asm line 2"

There may be multiple module inline assembly blocks with different
properties.

This is intended to fix the long standing issue where in LTO scenarios
we don't know what target features to use for parsing the module-level
inline assembly. Now they can be faithfully preserved, even when merging
inline assembly from different modules with different features.

If target_features and target_cpu are empty, we fall back to the old
behavior (which, in the backend, would be to use the default subtarget
of the TargetMachine).

Fixes https://github.com/llvm/llvm-project/issues/61991.
Fixes https://github.com/llvm/llvm-project/issues/67698.
2026-07-06 11:57:38 +02:00
..
Inputs [ObjC] Emit number, array, and dictionary literals as constants (#185130) 2026-03-25 15:03:14 -07:00
2007-04-03-ObjcEH.m
2007-05-02-Strong.m
2007-10-18-ProDescriptor.m
2007-10-23-GC-WriteBarrier.m
2008-08-25-incompatible-cond-expr.m
2008-10-3-EhValue.m
2008-10-23-invalid-icmp.m
2008-11-12-Metadata.m
2008-11-24-ConstCFStrings.m
2008-11-25-Blocks.m
2009-01-26-WriteBarrier-2.m
2009-02-05-VolatileProp.m
2009-08-05-utf16.m
2010-02-01-utf16-with-null.m
2010-03-17-StructRef.m
2011-03-08-IVarLookup.m
aarch64-sve-types.m [clang][NFC][diagnostics] Remove several uses of getCustomDiagID() (#172532) 2026-03-01 16:25:23 +00:00
arc-arm.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-block-copy-escape.m
arc-blocks-exceptions.m
arc-blocks.m [IR] Remove size argument from lifetime intrinsics (#150248) 2025-08-08 11:09:34 +02:00
arc-bridged-cast.m
arc-captured-32bit-block-var-layout-2.m
arc-captured-32bit-block-var-layout.m
arc-captured-block-var-inlined-layout.m
arc-captured-block-var-layout.m
arc-compound-stmt.m
arc-cond-stmt.m
arc-constant-literals.m [ObjC] Emit number, array, and dictionary literals as constants (#185130) 2026-03-25 15:03:14 -07:00
arc-exceptions.m
arc-foreach.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-i386.m
arc-ivar-layout.m
arc-literals.m
arc-loadweakretained-release.m
arc-no-arc-exceptions.m
arc-no-runtime.m
arc-precise-lifetime.m [IR] Remove size argument from lifetime intrinsics (#150248) 2025-08-08 11:09:34 +02:00
arc-property.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-related-result-type.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-rv-attr.m
arc-ternary-op.m [IR] Remove size argument from lifetime intrinsics (#150248) 2025-08-08 11:09:34 +02:00
arc-unbridged-cast.m
arc-unopt.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-unoptimized-byref-var.m
arc-unsafeclaim.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc-weak-property.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
arc-weak.m
arc-with-atthrow.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
arc.ll
arc.m [IR] Remove size argument from lifetime intrinsics (#150248) 2025-08-08 11:09:34 +02:00
arm-atomic-scalar-setter-getter.m
arm64-int32-ivar.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
asm.m
assign.m
atomic-aggregate-property.m
attr-availability.m
attr-callconv.m
attr-exception.m
attr-minsize.m
attr-no-outline.m [clang] Ensure -mno-outline adds attributes (#163692) 2026-02-18 10:16:31 -08:00
attr-nomerge.m
attr-noreturn.m
attr-objc-arc-inert.m
attr-objc-runtime-visible.m
attr-speculative-load-hardening.m
attr-strong.c
attr-used-on-method.m
auto-property-synthesize-protocol.m
autorelease.m
availability-cf-link-guard.m
availability-check-maccatalyst.m
availability-check.m
availability-dso-local.m
bitfield-1.m
bitfield-access.m
bitfield-gnu.m
bitfield-ivar-metadata.m
bitfield-ivar-offsets.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
bitfield_encoding.m
block-6.m
block-byref-variable-layout.m
block-desc-str.m
block-layout-section.m Move the ObjC blocks layout bitmap to the cstring section (#182398) 2026-02-23 10:44:09 -08:00
block-over-align.m
block-ptr-type-crash.m
block-var-layout.m
blocks-1.m
blocks-2.m
blocks-3.m
blocks-4.m
blocks-5.m
blocks.m
boxing.m
builtin-constant-p.m
builtin-memfns.m
builtins.m
category-class-empty.m
category-class.m Reapply [IR] Explicitly specify target feature for module asm (#204548) (#207677) 2026-07-06 11:57:38 +02:00
category-super-class-meth.m
class-getter-dotsyntax.m
class-stubs.m
class-type.m
compatibility-alias.m
complex-double-abi.m
complex-property.m
compound-literal-property-access.m
constant-non-fragile-ivar-offset.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
constant-string-class-1.m [clang][test] Add missing FileCheck pipe in constant-string-class-1.m (#189514) 2026-03-31 07:42:05 -04:00
constant-string-class.m
constant-strings.m
continuation-class.m
convert-messages-to-runtime-calls.m
deadcode_strip_used_var.m
default-property-synthesis.m
designated-initializers.m
direct-method-ret-mismatch.m [ObjCDirectPreconditionThunk] precondition check thunk generation (#170618) 2026-03-30 10:32:09 -07:00
direct-method.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
direct-properties.m
disable-direct-method.m
disable-tail-call-escaping-block.m
dllstorage.m
dot-syntax-1.m
dot-syntax-2.m
dot-syntax.m
empty-collection-literals.m
encode-cstyle-method.m
encode-test-2.m
encode-test-3.m
encode-test-4.m
encode-test-5.m
encode-test-6.m [clang] Fix x86_64-windows-msvc over- and under-alignment (#196505) 2026-05-12 07:55:36 +02:00
encode-test-bitint.m
encode-test.m
exceptions-asm-attribute.m
exceptions-nonfragile.m
exceptions-personality.m
exceptions.m Reapply [SimplifyCFG] Extend jump-threading to allow live local defs (#197850) 2026-05-22 15:18:01 -05:00
expose-direct-method-linkedlist.m [ObjCDirectPreconditionThunk] precondition check thunk generation (#170618) 2026-03-30 10:32:09 -07:00
expose-direct-method-varargs.m [ObjCDirectPreconditionThunk] precondition check thunk generation (#170618) 2026-03-30 10:32:09 -07:00
expose-direct-method-visibility-linkage.m [ObjCDirectPreconditionThunk] precondition check thunk generation (#170618) 2026-03-30 10:32:09 -07:00
expose-direct-method.m [ObjCDirectPreconditionThunk] precondition check thunk generation (#170618) 2026-03-30 10:32:09 -07:00
extended-block-signature-encode.m
extern-void-class-decl.m
externally-initialized-selectors.m
externally-retained.m
for-in.m
forward-class-impl-metadata.m
forward-decl-param.m
forward-declare-protocol-gnu.m
forward-protocol-metadata-symbols.m
fp2ret.m
fpret.m
fragile-arc.m Move the ObjC layout bitmap to the cstring section. (#174705) 2026-01-20 10:04:20 -08:00
function-decay.m
gc-weak-attribute.m
gc.m
getter-property-mismatch.m
getter-property-type-mismatch.m
gnu-deterministic-selectors.m
gnu-empty-protocol-v3.m
gnu-exceptions.m
gnu-init.m
gnu-method-only-once.m
gnu-nil-receiver.m
gnustep2-category-protocol.m
gnustep2-category.m
gnustep2-class-exts.m [CodeGen][ObjC] Include all referenced protocols in protocol list (#148827) 2025-07-15 13:42:42 +01:00
gnustep2-class.m
gnustep2-direct-method.m
gnustep2-ivar-offset.m
gnustep2-nontrivial-destructor-argument.mm
gnustep2-proto.m
hidden-visibility.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
hidden.m
id-isa-codegen.m
illegal-UTF8.m
image-info.m
implicit-objc_msgSend.m
implicit-property.m
initialize-function-static.m
instance-method-metadata.m
interface-layout-64.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
interface.m
ivar-base-as-invariant-load.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
ivar-invariant.m
ivar-layout-64-bitfields.m
ivar-layout-64.m Move the ObjC layout bitmap to the cstring section. (#174705) 2026-01-20 10:04:20 -08:00
ivar-layout-array0-struct.m Move the ObjC layout bitmap to the cstring section. (#174705) 2026-01-20 10:04:20 -08:00
ivar-layout-flexible-array.m
ivar-layout-no-optimize.m Move the ObjC layout bitmap to the cstring section. (#174705) 2026-01-20 10:04:20 -08:00
ivar-layout-nonfragile-abi2.m
ivar-type-encoding.m
ivars.m
labeled-break-continue.m [Clang] [C2y] Implement N3355 ‘Named Loops’ (#152870) 2025-09-02 16:37:19 +00:00
link-errors.m
lit.local.cfg
local-static-block.m
mangle-blocks.m
matrix-type-builtins.m
matrix-type-operators.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
message-arrays.m
messages-2.m
messages.m
metadata-class-properties.m
metadata-symbols-32.m
metadata-symbols-64.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
metadata_symbols.m
method-selector-stub.m [ObjC] Emit class msgSend stub calls (#186433) 2026-03-13 09:48:47 -07:00
misc-atomic-property.m
mrc-weak.m Move the ObjC layout bitmap to the cstring section. (#174705) 2026-01-20 10:04:20 -08:00
mrr-autorelease.m
mrr-captured-block-var-inlined-layout.m
nested-rethrow.m
newproperty-nested-synthesis-1.m
next-objc-dispatch.m
no-category-class.m
no-nsconstant-literals.m [clang][bytecode] Add support for objc array- and dictionary literals (#189058) 2026-03-28 05:52:23 +01:00
no-sanitize.m
no-vararg-messaging.m
noescape.m [Clang][CodeGen] map noescape to capture(address) (was capture(none)) (#199281) 2026-05-22 21:55:41 -07:00
non-lazy-classes.m
non-runtime-protocol.m
nonlazy-msgSend.m
nontrivial-c-struct-func-name-collision.m
nontrivial-c-struct-property.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
nontrivial-c-struct-within-struct-name.m
nontrivial-c-struct.m [CodeGen] Remove the check that allowed non-POD compound literals to be directly evaluated into the destination even when it might alias the source (#167344) 2025-11-12 13:16:29 -08:00
nontrivial-struct-param-init.m
ns-constant-strings.m
ns_consume_null_check.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
NSFastEnumeration.m
nsvalue-objc-boxable-ios-arc.m
nsvalue-objc-boxable-ios.m
nsvalue-objc-boxable-mac-arc.m
nsvalue-objc-boxable-mac.m
null-check-bool-ret.m
null-objc-empty-vtable.m
nullptr-assert.m
objc-align.m
objc-alloc-init.m
objc-arc-container-subscripting.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
objc-arc-ubsan-debugging.m
objc-asm-attribute-test.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
objc-assign-ivar.m
objc-container-subscripting-1.m
objc-container-subscripting.m
objc-dictionary-literal.m
objc-dispatch-null-check.m
objc-gc-aggr-assign.m
objc-literal-debugger-test.m
objc-literal-tests.m [AsmWriter] Change the output syntax of floating-point literals. (#190649) 2026-05-07 13:16:14 -04:00
objc-non-trivial-struct-nrvo.m
objc-read-weak-byref.m
objc-runtime-name.m Reapply [IR] Explicitly specify target feature for module asm (#204548) (#207677) 2026-07-06 11:57:38 +02:00
objc2-assign-global.m
objc2-constant-collection-literals.m [clang][bytecode] Add support for objc array- and dictionary literals (#189058) 2026-03-28 05:52:23 +01:00
objc2-constant-literal-custom-class.m [ObjC] Emit number, array, and dictionary literals as constants (#185130) 2026-03-25 15:03:14 -07:00
objc2-constant-literals-ptrauth.m [ObjC] Fix missing ptrauth signing of isa in constant ObjC literals (#191091) 2026-04-21 01:18:16 +00:00
objc2-constant-number-literal.m [AsmWriter] Change the output syntax of floating-point literals. (#190649) 2026-05-07 13:16:14 -04:00
objc2-ivar-assign.m
objc2-legacy-dispatch.m
objc2-new-gc-api-strongcast.m
objc2-no-strong-cast.m
objc2-no-write-barrier.m
objc2-nonfragile-abi-impl.m
objc2-property-encode.m
objc2-protocol-enc.m
objc2-protocol-metadata.m
objc2-retain-codegen.m
objc2-strong-cast-1.m
objc2-strong-cast-block-import.m
objc2-strong-cast.m
objc2-weak-assign.m
objc2-weak-block-call.m
objc2-weak-compare.m
objc2-weak-import-attribute.m
objc2-weak-ivar.m
objc2-write-barrier-2.m
objc2-write-barrier-3.m
objc2-write-barrier-4.m
objc2-write-barrier-5.m
objc2-write-barrier.m
objc_copyStruct.m
object-incr-decr-1.m
objfw.m
optimize-ivar-offset-load.m
optimized-setter-ios-device.m
optimized-setter.m
os_log.m Revert "Reapply "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)" (#177285)" (#177533) 2026-01-23 11:56:31 +01:00
overloadable.m
parameterized_classes.m
pass-by-value-noalias.m [Clang][CodeGen] Emit alignment information for indirect arguments (#201999) 2026-07-02 09:35:24 -07:00
personality.m
ppc32-varargs-id.m
predefined-expr.m
private-extern-selector-reference.m
prop-metadata-gnu.m
property-aggregate.m
property-agrr-getter.m
property-array-type.m [C11] Implement WG14 N1285 (temporary lifetimes) (#133472) 2025-04-10 08:12:14 -04:00
property-atomic-bool.m [CodeGen] Change -O0 bool load codegen to have nonzero model (#193783) 2026-04-27 17:07:20 -04:00
property-category-impl.m
property-complex.m
property-getter-dot-syntax.m
property-incr-decr-1.m
property-list-in-class.m
property-list-in-extension.m
property-ref-cast-to-void.m
property-section-attribute.m
property-setter-attr.m
property-type-mismatch.m
property.m
protocol-comdat.m
protocol-in-extended-class.m
protocol-property-synth.m
protocols-lazy.m
protocols.m
ptrauth-attr-exception.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-block-descriptor-pointer.m [clang][Obj-C][PAC] Make block descriptor pointer signing configurable (#153700) 2025-08-14 17:20:27 -07:00
ptrauth-block-isa.m [clang][Obj-C][PAC] Make block descriptor pointer signing configurable (#153700) 2025-08-14 17:20:27 -07:00
ptrauth-class-ro.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-class.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-objc-interface-selector.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-objc-isa-super.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-objc-method-list-pointer.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
ptrauth-property-backing.m [clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899) 2025-07-14 19:32:18 -07:00
rdr-6732143-dangling-block-reference.m
related-result-type.m
reorder-synthesized-ivars.m
return-objc-object.mm
runtime-abi-match.m
runtime-fns.m
section-name.m
sections.m
sel-as-builtin-type.m
selector-ref-invariance.m
simplify-exceptions.mm
stand-alone-implementation.m
stret-1.m
stret-lifetime.m
stret.m
stret_lookup.m
strict-bool.m [CodeGen] Change -O0 bool load codegen to have nonzero model (#193783) 2026-04-27 17:07:20 -04:00
strong-in-c-struct.m [CodeGen] Change -O0 bool load codegen to have nonzero model (#193783) 2026-04-27 17:07:20 -04:00
super-classmethod-category.m
super-dotsyntax-property.m
super-dotsyntax-struct-property.m
super-message-fragileabi.m [CodeGen] Use data layout aware constant folder in CGBuilder (#184819) 2026-03-06 08:33:34 +00:00
synchronized.m
synthesize_ivar-cont-class.m
synthesize_ivar.m
tentative-cfconstantstring.m
terminate.m
try.m
ubsan-array-bounds.m
ubsan-bool.m [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (#85465) 2025-03-04 08:34:18 -08:00
ubsan-nonnull-and-nullability.m
ubsan-nonnull.m
ubsan-nullability-return-unreachable.m
ubsan-nullability.m
undefined-protocol.m
undefined-protocol2.m
unname-bf-metadata.m
unoptimized-setter.m
unqual-copy-restore.m
variadic-sends.m
weak-in-c-struct.m [Clang][CodeGen] Emit alignment information for indirect arguments (#201999) 2026-07-02 09:35:24 -07:00
weak-metaclass-visibility.m
x86_64-struct-return-gc.m