[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 17 11:23:46 PDT 2025


================
@@ -47,7 +47,19 @@ int main() {
   // Make sure the following 3 are the same between the host and device compile.
   // Note that these are NOT the same value as each other, they differ by the
   // signature.
-  // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUlvE_\00"
-  // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUliE_\00"
-  // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUldE_\00"
+  // HOST: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUlvE_\00"
+  // HOST: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUliE_\00"
+  // HOST: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUldE_\00"
----------------
tahonermann wrote:

That's odd. For the test to have passed previously, they must have been generated. I don't see a reason why your changes would have affected that behavior. This test does pass without your changes, right?

https://github.com/llvm/llvm-project/pull/159115


More information about the cfe-commits mailing list