Warn if `.size` is specified for a function symbol. The size of a function symbol is determined solely by its content. I noticed this simplification was possible while debugging #57427, but this change doesn't fix that specific issue. Differential Revision: https://reviews.llvm.org/D132929
16 lines
408 B
ArmAsm
16 lines
408 B
ArmAsm
# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o 2>&1 | FileCheck %s
|
|
# RUN: llvm-objdump -t %t.o
|
|
|
|
foo:
|
|
.functype foo () -> ()
|
|
i32.const 1
|
|
drop
|
|
end_function
|
|
|
|
# .size directives for functions are no longer required and will
|
|
# be ignored but we continue to allow them to support legacy
|
|
# assembly files.
|
|
.size foo, 0
|
|
|
|
# CHECK: warning: .size directive ignored for function symbols
|