mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 10:26:06 +00:00

Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions. I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default. Test updates are made as a separate patch: D108453 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D105169
30 lines
706 B
C++
30 lines
706 B
C++
// Make SEH works in PCH
|
|
//
|
|
// Test this without pch.
|
|
// 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 -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
|
|
|
|
int shouldCatch();
|
|
inline int f() {
|
|
__try {
|
|
} __except (shouldCatch()) {
|
|
}
|
|
return 0;
|
|
}
|
|
int x = f();
|
|
|
|
// CHECK: define linkonce_odr dso_local noundef i32 @"?f@@YAHXZ"()
|
|
// CHECK: define internal noundef i32 @"?filt$0@0@f@@"({{.*}})
|
|
|
|
#else
|
|
|
|
// empty
|
|
|
|
#endif
|