1 // RUN: %clang_cc1 %s -triple amdgcn-amd-amdhsa -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s 2 // RUN: %clang_cc1 %s -triple spirv64-amd-amdhsa -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s --check-prefix=WITH-NONZERO-DEFAULT-AS 3 4 struct X { 5 ~X(); 6 }; 7 8 struct Error { 9 Error(const X&) noexcept; 10 }; 11 12 void f() { 13 try { 14 throw Error(X()); 15 } catch (...) { } 16 } 17 18 // CHECK: declare void @__cxa_throw(ptr, ptr addrspace(1), ptr) 19 // WITH-NONZERO-DEFAULT-AS: declare{{.*}} void @__cxa_throw(ptr addrspace(4), ptr addrspace(1), ptr addrspace(4)) 20