xref: /aosp_15_r20/external/llvm/test/Verifier/metadata-function-prof.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK: function declaration may not have a !prof attachment
4*9880d681SAndroid Build Coastguard Workerdeclare !prof !0 void @f1()
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine void @f2() !prof !0 {
7*9880d681SAndroid Build Coastguard Worker  unreachable
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; CHECK: function must have a single !prof attachment
11*9880d681SAndroid Build Coastguard Workerdefine void @f3() !prof !0 !prof !0 {
12*9880d681SAndroid Build Coastguard Worker  unreachable
13*9880d681SAndroid Build Coastguard Worker}
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker!0 = !{}
16