1 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fexceptions -fcxx-exceptions -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name trymacro.cpp %s | FileCheck %s 2 3 // CHECK: Z3fn1v: 4 void fn1() try { return; } // CHECK: [[@LINE]]:12 -> [[@LINE+1]]:14 = #1 5 catch(...) {} // CHECK: [[@LINE]]:12 -> [[@LINE]]:14 = #2 6 7 #define RETURN_BLOCK { return; } 8 9 // CHECK: Z3fn2v: 10 void fn2() try RETURN_BLOCK // CHECK: [[@LINE]]:12 -> [[@LINE+1]]:14 = #1 11 catch(...) {} // CHECK: [[@LINE]]:12 -> [[@LINE]]:14 = #2 12 13 #define TRY try 14 #define CATCH(x) catch (x) 15 16 // CHECK: Z3fn3v: 17 void fn3() TRY { return; } // CHECK: [[@LINE]]:15 -> [[@LINE+1]]:14 = #1 18 CATCH(...) {} // CHECK: [[@LINE]]:12 -> [[@LINE]]:14 = #2 19 20 int main() { 21 fn1(); 22 fn2(); 23 fn3(); 24 } 25