[clang] f7a1f7a - Fix test on 32-bit targets.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 17:38:59 PST 2022


Author: Richard Smith
Date: 2022-12-12T17:38:51-08:00
New Revision: f7a1f7ab70eadd8264db2d3f956a1a6bab749c01

URL: https://github.com/llvm/llvm-project/commit/f7a1f7ab70eadd8264db2d3f956a1a6bab749c01
DIFF: https://github.com/llvm/llvm-project/commit/f7a1f7ab70eadd8264db2d3f956a1a6bab749c01.diff

LOG: Fix test on 32-bit targets.

Added: 
    

Modified: 
    clang/test/CodeGenCXX/weak-external.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/weak-external.cpp b/clang/test/CodeGenCXX/weak-external.cpp
index 34af2028a9d3..af636ccb4a3a 100644
--- a/clang/test/CodeGenCXX/weak-external.cpp
+++ b/clang/test/CodeGenCXX/weak-external.cpp
@@ -90,9 +90,9 @@ namespace constant_eval {
     [[gnu::weak]] void f();
   };
   // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-  // CHECK:     store i8 zext (i1 icmp ne (i64 ptrtoint (ptr @_ZN13constant_eval1X1fEv to i64), i64 0) to i8), ptr @_ZN13constant_eval6has_f1E,
+  // CHECK:     store i8 zext (i1 icmp ne (i{{32|64}} ptrtoint (ptr @_ZN13constant_eval1X1fEv to i{{32|64}}), i{{32|64}} 0) to i8), ptr @_ZN13constant_eval6has_f1E,
   bool has_f1 = &X::f;
   // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-  // CHECK:     store i8 zext (i1 icmp ne (i64 ptrtoint (ptr @_ZN13constant_eval1X1fEv to i64), i64 0) to i8), ptr @_ZN13constant_eval6has_f2E,
+  // CHECK:     store i8 zext (i1 icmp ne (i{{32|64}} ptrtoint (ptr @_ZN13constant_eval1X1fEv to i{{32|64}}), i{{32|64}} 0) to i8), ptr @_ZN13constant_eval6has_f2E,
   bool has_f2 = &X::f != nullptr;
 }


        


More information about the cfe-commits mailing list