brintos

brintos / llvm-project-archived public Read only

0
0
Text · 865 B · 2c2caa9 Raw
21 lines · cpp
1// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \2// RUN:     -fno-sanitize-type-outline-instrumentation \3// RUN:     | FileCheck %s --check-prefixes=CHECK-NO-OUTLINE4// RUN: %clang --target=x86_64-linux-gnu -S -fsanitize=type -emit-llvm -o - %s \5// RUN:     -fsanitize-type-outline-instrumentation \6// RUN:     | FileCheck %s --check-prefixes=CHECK-OUTLINE7 8// CHECK-LABEL: @alias9// CHECK: __tysan_app_memory_mask10// CHECK: __tysan_shadow_memory_address11// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_mem_inst12// CHECK-NO-OUTLINE-NOT: call{{.*}}@__tysan_instrument_with_shadow_update13// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_mem_inst14// CHECK-OUTLINE: call{{.*}}@__tysan_instrument_with_shadow_update15 16float alias(int *ptr){17    float *aliasedPtr = (float *)ptr;18    *aliasedPtr *= 2.0f;19    return *aliasedPtr;20}21