Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: test/NaCl/PNaClABI/abi-debug-info.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 ; RUN: not pnacl-abicheck < %s | FileCheck %s
2 ; RUN: not pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | \
3 ; RUN: FileCheck %s --check-prefix=DBG
4
5 ; DBG-NOT: disallowed
6
7 ; A debuginfo version is required.
8 !llvm.module.flags = !{!0}
9 !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 2}
10 !1 = metadata !{}
11
12 declare void @llvm.dbg.declare(metadata, metadata)
13 declare void @llvm.dbg.value(metadata, i64, metadata)
14
15 ; CHECK: Function llvm.dbg.declare is a disallowed LLVM intrinsic
16 ; CHECK: Function llvm.dbg.value is a disallowed LLVM intrinsic
17
18
19 define internal void @debug_declare(i32 %val) {
20 ; We normally expect llvm.dbg.declare to be used on an alloca.
21 %var = alloca [4 x i8]
22 tail call void @llvm.dbg.declare(metadata !{[4 x i8]* %var}, metadata !1)
23 tail call void @llvm.dbg.declare(metadata !{i32 %val}, metadata !1)
24 ret void
25 }
26
27 define internal void @debug_value(i32 %ptr_as_int, i32 %val) {
28 %ptr = inttoptr i32 %ptr_as_int to i8*
29 tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 2, metadata !1)
30 tail call void @llvm.dbg.value(metadata !{i32 %val}, i64 1, metadata !1)
31 ret void
32 }
33
34 ; FileCheck gives an error if its input file is empty, so ensure that
35 ; the output of pnacl-abicheck is non-empty by generating at least one
36 ; error.
37 declare void @bad_func(ppc_fp128 %bad_arg)
38 ; DBG: Function bad_func has disallowed type: void (ppc_fp128)
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/abi-call-attributes.ll ('k') | test/NaCl/PNaClABI/abi-entry-point-required.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698