// Ensure compatiblity of UBSan unreachable with ASan in the presence of
// noreturn functions
// RUN: %clang -O2 -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s
// REQUIRES: ubsan-asan

void bar(void) __attribute__((noreturn));

void foo() {
  bar();
}
// CHECK-LABEL: define void @foo()
// CHECK:       call void @__asan_handle_no_return
// CHECK-NEXT:  call void @bar
// CHECK-NEXT:  call void @__asan_handle_no_return
// CHECK-NEXT:  call void @__ubsan_handle_builtin_unreachable
// CHECK-NEXT:  unreachable

// Ensure compatiblity of UBSan unreachable with ASan in the presence of
// noreturn functions
// RUN: %clang -O2 -fPIC -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s
// REQUIRES: ubsan-asan

void bar(void) __attribute__((noreturn));

void foo() {
  bar();
}
// CHECK-LABEL: define void @foo()
// CHECK:       call void @__asan_handle_no_return
// CHECK-NEXT:  call void @bar
// CHECK-NEXT:  call void @__asan_handle_no_return
// CHECK-NEXT:  call void @__ubsan_handle_builtin_unreachable
// CHECK-NEXT:  unreachable

Fix test when isPICDefault() returns false after rCTE352003
[ubsan] Fix test when isPICDefault() returns false after rCTE352003

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@352013 91177308-0d34-0410-b5e6-96231b3b80d8
