#!/bin/bash #===- lib/asan/scripts/gen_asm_instrumentation.sh -------------------------===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # # Emit x86 instrumentation functions for asan. # #===-----------------------------------------------------------------------===# check() { test $# -eq 2 || (echo "Incorrent number of arguments: $#" 1>&2 && exit 1) case "$1" in store) ;; load) ;; *) echo "Incorrect first argument: $1" 1>&2 && exit 1 ;; esac case "$2" in [0-9]*) ;; *) echo "Incorrect second argument: $2" 1>&2 && exit 1 ;; esac } func_name() { check $1 $2 echo "__sanitizer_sanitize_$1$2" } func_label() { check $1 $2 echo ".sanitize_$1$2_done" } func_report() { check $1 $2 echo "__asan_report_$1$2" } emit_call_report() { cat <&2; exit 1 ;; esac cat <&2; exit 1 ;; esac cat <&2; exit 1 ;; esac cat <&2; exit 1 ;; esac cat <