diff options
| author | David Green <david.green@arm.com> | 2025-11-12 16:26:21 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-12 16:26:21 +0000 |
| commit | 4d1f2492d26f8c2fad0eee2a141c7e0bbbc4c868 (patch) | |
| tree | e502195c3d5963671ba602e9dbdffa745ed0d122 /llvm/test/CodeGen/ARM | |
| parent | ec085e5201f013d75104124179c429156bfb6258 (diff) | |
[ARM] Use TargetMachine over Subtarget in ARMAsmPrinter (#166329)
The subtarget may not be set if no functions are present in the module.
Attempt to use the TargetMachine directly in more cases.
Fixes #165422
Fixes #167577
Diffstat (limited to 'llvm/test/CodeGen/ARM')
| -rw-r--r-- | llvm/test/CodeGen/ARM/xxstructor-nodef.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/xxstructor-nodef.ll b/llvm/test/CodeGen/ARM/xxstructor-nodef.ll new file mode 100644 index 000000000000..db17b2b1c21a --- /dev/null +++ b/llvm/test/CodeGen/ARM/xxstructor-nodef.ll @@ -0,0 +1,7 @@ +; RUN: llc -mtriple=arm-unknown-linux-gnueabihf < %s | FileCheck %s + +; This test contains a llvm.global_ctors with no other definitions. Make sure we do not crash in that case. +; CHECK: .section .init_array,"aw",%init_array + +declare ccc void @ghczmbignum_GHCziNumziBackendziSelected_init__prof_init() +@llvm.global_ctors = appending global [1 x {i32, void ()*, i8* }] [{i32, void ()*, i8* }{i32 65535, void ()* @ghczmbignum_GHCziNumziBackendziSelected_init__prof_init, i8* null } ] |
