Skip to content

Commit

Permalink
Regenerate target triple in StringEncoding tests
Browse files Browse the repository at this point in the history
The target triple seems to be not inferred correctly when
the encode/decode functions are jit-compiled, if the iOS
version is missed. Ensure this is taken into account.
  • Loading branch information
antoniofrighetto committed Oct 30, 2024
1 parent 699106a commit 053b99d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/passes/strings-encoding/basic-aarch64-ce-init.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; REQUIRES: aarch64-registered-target

; RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \
; RUN: -target arm64-apple-ios -O1 -c %s -o - | strings | FileCheck %s
; RUN: -target arm64-apple-ios17.5.0 -O1 -c %s -o - | strings | FileCheck %s
;
; RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \
; RUN: -target aarch64-linux-android -O1 -c %s -o - | strings | FileCheck %s
Expand Down
12 changes: 6 additions & 6 deletions src/test/passes/strings-encoding/basic-aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

// The default object contains the file-name string:
// RUN: clang++ -target aarch64-linux-android-O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-DEFAULT -DFILE_NAME=%s %s
// RUN: clang++ -target arm64-apple-ios -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-DEFAULT -DFILE_NAME=%s %s
// RUN: clang++ -target arm64-apple-ios17.5.0 -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-DEFAULT -DFILE_NAME=%s %s
// CHECK-DEFAULT: [[FILE_NAME]]

// The 'remove' configuration overwrites it with the fixed REDACTED literal:
// RUN: env OMVLL_CONFIG=%S/config_remove.py clang++ -fpass-plugin=%libOMVLL \
// RUN: -target aarch64-linux-android-O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REMOVED -DFILE_NAME=%s %s
// RUN: -target aarch64-linux-android -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REMOVED -DFILE_NAME=%s %s
//
// RUN: env OMVLL_CONFIG=%S/config_remove.py clang++ -fpass-plugin=%libOMVLL -O1 \
// RUN: -target arm64-apple-ios -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REMOVED -DFILE_NAME=%s %s
// RUN: env OMVLL_CONFIG=%S/config_remove.py clang++ -fpass-plugin=%libOMVLL \
// RUN: -target arm64-apple-ios17.5.0 -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REMOVED -DFILE_NAME=%s %s
//
// CHECK-REMOVED-NOT: [[FILE_NAME]]
// CHECK-REMOVED: REDACTED
Expand All @@ -20,10 +20,10 @@

// The 'replace' configuration encodes the string and adds logic that decodes it at load-time:
// RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \
// RUN: -target aarch64-linux-android-O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REPLACED -DFILE_NAME=%s %s
// RUN: -target aarch64-linux-android -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REPLACED -DFILE_NAME=%s %s
//
// RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \
// RUN: -target arm64-apple-ios -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REPLACED -DFILE_NAME=%s %s
// RUN: -target arm64-apple-ios17.5.0 -O1 -c %s -o - | strings | FileCheck --check-prefix=CHECK-REPLACED -DFILE_NAME=%s %s

// CHECK-REPLACED-NOT: [[FILE_NAME]]

Expand Down
2 changes: 1 addition & 1 deletion src/test/passes/strings-encoding/basic-ios-swift.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

; The 'replace' configuration encodes the string and adds logic that decodes it at load-time:
; RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \
; RUN: -target arm64-apple-ios -O1 -c %s -o - | strings | FileCheck %s
; RUN: -target arm64-apple-ios17.5.0 -O1 -c %s -o - | strings | FileCheck %s
;
; CHECK-NOT: {{.*Hello, Swift.*}}

Expand Down

0 comments on commit 053b99d

Please sign in to comment.