Skip to content

Commit 6287567

Browse files
committed
merge main into amd-staging
2 parents 8d23754 + 7eb65f4 commit 6287567

File tree

33 files changed

+560
-342
lines changed

33 files changed

+560
-342
lines changed

clang/include/clang-c/Index.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6953,6 +6953,21 @@ clang_getCursorUnaryOperatorKind(CXCursor cursor);
69536953
* @}
69546954
*/
69556955

6956+
CINDEX_DEPRECATED
6957+
typedef void *CXRemapping;
6958+
6959+
CINDEX_DEPRECATED CINDEX_LINKAGE CXRemapping clang_getRemappings(const char *);
6960+
6961+
CINDEX_DEPRECATED CINDEX_LINKAGE CXRemapping
6962+
clang_getRemappingsFromFileList(const char **, unsigned);
6963+
6964+
CINDEX_DEPRECATED CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
6965+
6966+
CINDEX_DEPRECATED CINDEX_LINKAGE void
6967+
clang_remap_getFilenames(CXRemapping, unsigned, CXString *, CXString *);
6968+
6969+
CINDEX_DEPRECATED CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
6970+
69566971
LLVM_CLANG_C_EXTERN_C_END
69576972

69586973
#endif

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n")
164164
BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n")
165165

166166
TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_load_lds, "vQbv*3IUiiiIiIi", "t", "vmem-to-lds-load-insts")
167+
TARGET_BUILTIN(__builtin_amdgcn_struct_ptr_buffer_load_lds, "vQbv*3IUiiiiIiIi", "t", "vmem-to-lds-load-insts")
167168

168169
//===----------------------------------------------------------------------===//
169170
// Ballot builtins.

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ CODEGENOPT(XCOFFReadOnlyPointers, 1, 0, Benign) ///< Set for -mxcoff-roptr.
5656
CODEGENOPT(AllTocData, 1, 0, Benign) ///< AIX -mtocdata
5757
ENUM_CODEGENOPT(FramePointer, FramePointerKind, 2, FramePointerKind::None, Benign) /// frame-pointer: all,non-leaf,reserved,none
5858

59+
ENUM_CODEGENOPT(ExceptionHandling, ExceptionHandlingKind, 3, ExceptionHandlingKind::None, NotCompatible)
60+
5961
CODEGENOPT(ClearASTBeforeBackend , 1, 0, Benign) ///< Free the AST before running backend code generation. Only works with -disable-free.
6062
CODEGENOPT(DisableFree , 1, 0, Benign) ///< Don't free memory.
6163
CODEGENOPT(DiscardValueNames , 1, 0, Benign) ///< Discard Value Names from the IR (LLVMContext flag)

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ class CodeGenOptions : public CodeGenOptionsBase {
176176
llvm_unreachable("invalid FramePointerKind");
177177
}
178178

179+
/// Possible exception handling behavior.
180+
enum class ExceptionHandlingKind { None, SjLj, WinEH, DwarfCFI, Wasm };
181+
179182
enum class SwiftAsyncFramePointerKind {
180183
Auto, // Choose Swift async extended frame info based on deployment target.
181184
Always, // Unconditionally emit Swift async extended frame info.
@@ -560,6 +563,22 @@ class CodeGenOptions : public CodeGenOptionsBase {
560563
return NoBuiltinFuncs;
561564
}
562565

566+
bool hasSjLjExceptions() const {
567+
return getExceptionHandling() == ExceptionHandlingKind::SjLj;
568+
}
569+
570+
bool hasSEHExceptions() const {
571+
return getExceptionHandling() == ExceptionHandlingKind::WinEH;
572+
}
573+
574+
bool hasDWARFExceptions() const {
575+
return getExceptionHandling() == ExceptionHandlingKind::DwarfCFI;
576+
}
577+
578+
bool hasWasmExceptions() const {
579+
return getExceptionHandling() == ExceptionHandlingKind::Wasm;
580+
}
581+
563582
/// Check if Clang profile instrumenation is on.
564583
bool hasProfileClangInstr() const {
565584
return getProfileInstr() ==

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ LANGOPT(Exceptions , 1, 0, NotCompatible, "exception handling")
9898
LANGOPT(ObjCExceptions , 1, 0, NotCompatible, "Objective-C exceptions")
9999
LANGOPT(CXXExceptions , 1, 0, NotCompatible, "C++ exceptions")
100100
LANGOPT(EHAsynch , 1, 0, NotCompatible, "C/C++ EH Asynch exceptions")
101-
ENUM_LANGOPT(ExceptionHandling, ExceptionHandlingKind, 3,
102-
ExceptionHandlingKind::None, NotCompatible, "exception handling")
103101
LANGOPT(IgnoreExceptions , 1, 0, NotCompatible, "ignore exceptions")
104102
LANGOPT(ExternCNoUnwind , 1, 0, NotCompatible, "Assume extern C functions don't unwind")
105103
LANGOPT(AssumeNothrowExceptionDtor , 1, 0, NotCompatible, "Assume exception object's destructor is nothrow")

clang/include/clang/Basic/LangOptions.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,6 @@ class LangOptionsBase {
337337

338338
enum ExcessPrecisionKind { FPP_Standard, FPP_Fast, FPP_None };
339339

340-
/// Possible exception handling behavior.
341-
enum class ExceptionHandlingKind { None, SjLj, WinEH, DwarfCFI, Wasm };
342-
343340
enum class LaxVectorConversionKind {
344341
/// Permit no implicit vector bitcasts.
345342
None,
@@ -788,22 +785,6 @@ class LangOptions : public LangOptionsBase {
788785
return getSignReturnAddressScope() == SignReturnAddressScopeKind::All;
789786
}
790787

791-
bool hasSjLjExceptions() const {
792-
return getExceptionHandling() == ExceptionHandlingKind::SjLj;
793-
}
794-
795-
bool hasSEHExceptions() const {
796-
return getExceptionHandling() == ExceptionHandlingKind::WinEH;
797-
}
798-
799-
bool hasDWARFExceptions() const {
800-
return getExceptionHandling() == ExceptionHandlingKind::DwarfCFI;
801-
}
802-
803-
bool hasWasmExceptions() const {
804-
return getExceptionHandling() == ExceptionHandlingKind::Wasm;
805-
}
806-
807788
bool isSYCL() const { return SYCLIsDevice || SYCLIsHost; }
808789

809790
bool hasDefaultVisibilityExportMapping() const {

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,10 +2185,10 @@ def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
21852185
HelpText<"Use WebAssembly style exceptions">;
21862186
def exception_model : Separate<["-"], "exception-model">,
21872187
Visibility<[CC1Option]>, HelpText<"The exception model">,
2188-
Values<"dwarf,sjlj,seh,wasm">,
2189-
NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">,
2190-
NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>,
2191-
MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">;
2188+
Values<"dwarf,sjlj,seh,wasm,none">,
2189+
NormalizedValuesScope<"CodeGenOptions::ExceptionHandlingKind">,
2190+
NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm", "None"]>,
2191+
MarshallingInfoEnum<CodeGenOpts<"ExceptionHandling">, "None">;
21922192
def exception_model_EQ : Joined<["-"], "exception-model=">,
21932193
Visibility<[CC1Option]>, Alias<exception_model>;
21942194
def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>,

0 commit comments

Comments
 (0)