serge-sans-paille | fd09f12 | 2020-01-16 11:56:41 +0100 | [diff] [blame^] | 1 | // Semantic Interposition is active if |
| 2 | // -fsemantic-interposition is set, |
| 3 | // - pic-level > 0 |
| 4 | // - pic-is-pie is not set |
| 5 | |
| 6 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 0 %s -o - | FileCheck %s -check-prefix=CHECK-NO-INTERPOSITION |
| 7 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 1 %s -o - | FileCheck %s -check-prefix=CHECK-INTERPOSITION |
| 8 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 2 %s -o - | FileCheck %s -check-prefix=CHECK-INTERPOSITION |
| 9 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 0 %s -o - | FileCheck %s -check-prefix=CHECK-NO-INTERPOSITION |
| 10 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 1 -pic-is-pie %s -o - | FileCheck %s -check-prefix=CHECK-NO-INTERPOSITION |
| 11 | // RUN: %clang_cc1 -emit-llvm -fsemantic-interposition -pic-level 2 -pic-is-pie %s -o - | FileCheck %s -check-prefix=CHECK-NO-INTERPOSITION |
| 12 | |
| 13 | // CHECK-NO-INTERPOSITION-NOT: "SemanticInterposition" |
| 14 | // CHECK-INTERPOSITION: !{{[0-9]+}} = !{i32 1, !"SemanticInterposition", i32 1} |