repo.or.cz
/
llvm
/
avr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
make tblgen produce a function that returns the name for a physreg.
[llvm/avr.git]
/
test
/
FrontendC
/
2008-11-11-AnnotateStructFieldAttribute.c
blob
fa5713e2482b4bb861535c7229d79f267b35a7f6
1
// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.ptr.annotation | count 3
2
3
#include <stdio.h>
4
5
/* Struct with element X being annotated */
6
struct
foo
{
7
int
X
__attribute__
((
annotate
(
"StructAnnotation"
)));
8
int
Y
;
9
int
Z
;
10
};
11
12
13
void
test
(
struct
foo
*
F
) {
14
F
->
X
=
42
;
15
F
->
Z
=
1
;
16
F
->
Y
=
F
->
X
;
17
}
18