-// RUN: %clang_cc1 -no-opaque-pointers -x c++-header -triple x86_64-apple-darwin11 -emit-pch -fblocks -fexceptions -o %t %S/block-helpers.h
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm -fblocks -fexceptions -o - %s | FileCheck %s
+// RUN: %clang_cc1 -x c++-header -triple x86_64-apple-darwin11 -emit-pch -fblocks -fexceptions -o %t %S/block-helpers.h
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm -fblocks -fexceptions -o - %s | FileCheck %s
-// CHECK: %[[STRUCT_BLOCK_BYREF_X:.*]] = type { i8*, %[[STRUCT_BLOCK_BYREF_X]]*, i32, i32, i8*, i8*, %[[STRUCT_S0:.*]] }
+// CHECK: %[[STRUCT_BLOCK_BYREF_X:.*]] = type { ptr, ptr, i32, i32, ptr, ptr, %[[STRUCT_S0:.*]] }
// CHECK: %[[STRUCT_S0]] = type { i32 }
-// CHECK: %[[STRUCT_BLOCK_BYREF_Y:.*]] = type { i8*, %[[STRUCT_BLOCK_BYREF_Y]]*, i32, i32, i8*, i8*, %[[STRUCT_S0]] }
-// CHECK: %[[STRUCT_BLOCK_DESCRIPTOR:.*]] = type { i64, i64 }
+// CHECK: %[[STRUCT_BLOCK_BYREF_Y:.*]] = type { ptr, ptr, i32, i32, ptr, ptr, %[[STRUCT_S0]] }
// Check that byref structs are allocated for x and y.
// CHECK-LABEL: define linkonce_odr void @_ZN1S1mEv(
// CHECK: %[[X:.*]] = alloca %[[STRUCT_BLOCK_BYREF_X]], align 8
// CHECK: %[[Y:.*]] = alloca %[[STRUCT_BLOCK_BYREF_Y]], align 8
-// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8* }>, align 8
-// CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8* }>* %[[BLOCK]], i32 0, i32 5
-// CHECK: %[[V0:.*]] = bitcast %[[STRUCT_BLOCK_BYREF_X]]* %[[X]] to i8*
-// CHECK: store i8* %[[V0]], i8** %[[BLOCK_CAPTURED]], align 8
-// CHECK: %[[BLOCK_CAPTURED10:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8* }>* %[[BLOCK]], i32 0, i32 6
-// CHECK: %[[V1:.*]] = bitcast %[[STRUCT_BLOCK_BYREF_Y]]* %[[Y]] to i8*
-// CHECK: store i8* %[[V1]], i8** %[[BLOCK_CAPTURED10]], align 8
+// CHECK: %[[BLOCK:.*]] = alloca <{ ptr, i32, i32, ptr, ptr, ptr, ptr }>, align 8
+// CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr }>, ptr %[[BLOCK]], i32 0, i32 5
+// CHECK: store ptr %[[X]], ptr %[[BLOCK_CAPTURED]], align 8
+// CHECK: %[[BLOCK_CAPTURED10:.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr }>, ptr %[[BLOCK]], i32 0, i32 6
+// CHECK: store ptr %[[Y]], ptr %[[BLOCK_CAPTURED10]], align 8
// CHECK-LABEL: define internal void @___ZN1S1mEv_block_invoke(
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t
+// RUN: %clang_cc1 -std=c++98 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t-cxx11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t-cxx11 -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
+// RUN: %clang_cc1 -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
+// RUN: %clang_cc1 -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t-cxx11
+// RUN: %clang_cc1 -std=c++11 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t-cxx11 -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t-cxx11
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t-cxx11 -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
+// RUN: %clang_cc1 -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -include %s -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
+// RUN: %clang_cc1 -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -emit-pch %s -o %t-cxx11
+// RUN: %clang_cc1 -std=c++20 -Wno-constant-evaluated -triple x86_64-linux -include-pch %t-cxx11 -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CXX11
// expected-no-diagnostics
void g(...);
// CHECK-LABEL: define {{.*}} @_Z1fv(
-// CHECK: store i8 0, i8* %[[A:.*]],
-// CHECK: store i8 1, i8* %[[B:.*]],
-// CXX11: store i8 1, i8* %[[C:.*]],
-// CHECK: store float 0.000000e+00, float* %[[D:.*]],
-// CHECK: store float 0.000000e+00, float* %[[E:.*]],
-// CHECK: load i8, i8* %[[A]],
+// CHECK: store i8 0, ptr %[[A:.*]],
+// CHECK: store i8 1, ptr %[[B:.*]],
+// CXX11: store i8 1, ptr %[[C:.*]],
+// CHECK: store float 0.000000e+00, ptr %[[D:.*]],
+// CHECK: store float 0.000000e+00, ptr %[[E:.*]],
+// CHECK: load i8, ptr %[[A]],
// CHECK: call {{.*}} @_Z1gz(i32 noundef %{{[^,]+}}, i32 noundef 1
// CXX11-SAME: , i32 noundef 1
// CHECK-SAME: , double noundef %{{[^,]+}}, double noundef 0.000000e+00)
// no PCH
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fnoopenmp-use-tls -emit-llvm -include %s -include %s %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -emit-llvm -include %s -include %s %s -o - | FileCheck %s
// with PCH
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -fnoopenmp-use-tls -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s
// no PCH
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-1
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-2
+// RUN: %clang_cc1 -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-1
+// RUN: %clang_cc1 -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-2
// with PCH
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-1
-// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-2
+// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-1
+// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-2
#if !defined(PASS1)
#define PASS1
#else
// CHECK: call {{.*}} @__kmpc_threadprivate_register(
-// CHECK-TLS-1: @{{a|\"\?a@@3PE?AHE?A\"}} = {{.*}}thread_local {{.*}}global {{.*}}i32*
+// CHECK-TLS-1: @{{a|\"\?a@@3PE?AHE?A\"}} = {{.*}}thread_local {{.*}}global {{.*}}ptr
// CHECK-LABEL: foo
// CHECK-TLS-LABEL: foo
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s | FileCheck %s
-// CHECK: define linkonce_odr noundef %{{[^ ]+}} @_ZN1AI1BE3getEv
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s | FileCheck %s
+// CHECK: define linkonce_odr noundef ptr @_ZN1AI1BE3getEv
#if !defined(PASS1)
#define PASS1
// Make sure we emit the MS ABI default ctor closure with PCH.
//
// Test this without pch.
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
#ifndef HEADER
#define HEADER
// Demangles as:
// void Foo::`default constructor closure'(void)
-// CHECK: define weak_odr dso_local dllexport void @"??_FFoo@@QEAAXXZ"(%struct.Foo*{{.*}})
-// CHECK: call noundef %struct.Foo* @"??0Foo@@QEAA@W4E@0@@Z"(%struct.Foo* {{.*}}, i32 noundef 0)
+// CHECK: define weak_odr dso_local dllexport void @"??_FFoo@@QEAAXXZ"(ptr{{.*}})
+// CHECK: call noundef ptr @"??0Foo@@QEAA@W4E@0@@Z"(ptr {{.*}}, i32 noundef 0)
#else
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -fms-extensions -x c++ %S/Inputs/pr27445.h -emit-pch -o %t.pch
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -fms-extensions %s -include-pch %t.pch -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -x c++ %S/Inputs/pr27445.h -emit-pch -o %t.pch
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions %s -include-pch %t.pch -emit-llvm -o - | FileCheck %s
class A;
void fn1(A &) {}
int field_;
};
-// CHECK: %class.A = type { void (%struct.Info*)*, i32 }
-// CHECK: %struct.Info = type { i32 (...)** }
+// CHECK: %class.A = type { ptr, i32 }
// Test this without pch.
-// RUN: %clang_cc1 -no-opaque-pointers -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -no-opaque-pointers -x c-header -emit-pch -o %t %S/pragma-weak-functional.h
-// RUN: %clang_cc1 -no-opaque-pointers -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak-functional.h
+// RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
-// CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), void ()* @undecfunc
-// CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), void ()* @undecfunc
-// CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), void ()* @undecfunc
-// CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), void ()* @undecfunc
+// CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), ptr @undecfunc
+// CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), ptr @undecfunc
+// CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), ptr @undecfunc
+// CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), ptr @undecfunc
///////////// PR28611: Try multiple aliases of same undeclared symbol or alias
void undecfunc_alias1(void);