diff options
| author | Pekka Enberg <penberg@kernel.org> | 2011-11-22 17:27:54 +0200 |
|---|---|---|
| committer | Pekka Enberg <penberg@kernel.org> | 2011-11-22 17:27:54 +0200 |
| commit | 2b67f8548ad54267e6c53a9d22f9f16affd07e97 (patch) | |
| tree | 556db3ad04dfa2151d723262e6de9b361146e1cb /validation/backend | |
| parent | 7101fe01404bbd985471122258b952abeaa0845b (diff) | |
| download | sparse-dev-2b67f8548ad54267e6c53a9d22f9f16affd07e97.tar.gz | |
sparse, llvm: Pointer cast code generation
This patch implement code generation for OP_PTRCAST using LLVMBuildBitCast().
Cc: Christopher Li <sparse@chrisli.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'validation/backend')
| -rw-r--r-- | validation/backend/ptrcast.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/validation/backend/ptrcast.c b/validation/backend/ptrcast.c new file mode 100644 index 00000000..46f8add8 --- /dev/null +++ b/validation/backend/ptrcast.c @@ -0,0 +1,9 @@ +static char *ptrcast(unsigned long *x) +{ + return (unsigned char *) x; +} + +/* + * check-name: Pointer cast code generation + * check-command: ./sparsec -c $file -o tmp.o + */ |
