[Intrinsic] Delete tablegen rules of llvm.{sig,}{setjmp,longjmp}

This commit is contained in:
Fangrui Song 2019-12-27 17:53:16 -08:00
parent 22f34c7f34
commit f7910496c8
2 changed files with 0 additions and 34 deletions

View File

@ -582,12 +582,6 @@ def int_maximum : Intrinsic<[llvm_anyfloat_ty],
[IntrNoMem, IntrSpeculatable, IntrWillReturn, Commutative]
>;
// NOTE: these are internal interfaces.
def int_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>;
def int_longjmp : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], [IntrNoReturn]>;
def int_sigsetjmp : Intrinsic<[llvm_i32_ty] , [llvm_ptr_ty, llvm_i32_ty]>;
def int_siglongjmp : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], [IntrNoReturn]>;
// Internal interface for object size checking
def int_objectsize : Intrinsic<[llvm_anyint_ty],
[llvm_anyptr_ty, llvm_i1_ty,

View File

@ -39,8 +39,6 @@ public:
void run(raw_ostream &OS, bool Enums);
void EmitPrefix(raw_ostream &OS);
void EmitEnumInfo(const CodeGenIntrinsicTable &Ints, raw_ostream &OS);
void EmitTargetInfo(const CodeGenIntrinsicTable &Ints, raw_ostream &OS);
void EmitIntrinsicToNameTable(const CodeGenIntrinsicTable &Ints,
@ -51,7 +49,6 @@ public:
void EmitAttributes(const CodeGenIntrinsicTable &Ints, raw_ostream &OS);
void EmitIntrinsicToBuiltinMap(const CodeGenIntrinsicTable &Ints, bool IsGCC,
raw_ostream &OS);
void EmitSuffix(raw_ostream &OS);
};
} // End anonymous namespace
@ -68,8 +65,6 @@ void IntrinsicEmitter::run(raw_ostream &OS, bool Enums) {
// Emit the enum information.
EmitEnumInfo(Ints, OS);
} else {
EmitPrefix(OS);
// Emit the target metadata.
EmitTargetInfo(Ints, OS);
@ -90,29 +85,9 @@ void IntrinsicEmitter::run(raw_ostream &OS, bool Enums) {
// Emit code to translate MS builtins into LLVM intrinsics.
EmitIntrinsicToBuiltinMap(Ints, false, OS);
EmitSuffix(OS);
}
}
void IntrinsicEmitter::EmitPrefix(raw_ostream &OS) {
OS << "// VisualStudio defines setjmp as _setjmp\n"
"#if defined(_MSC_VER) && defined(setjmp) && \\\n"
" !defined(setjmp_undefined_for_msvc)\n"
"# pragma push_macro(\"setjmp\")\n"
"# undef setjmp\n"
"# define setjmp_undefined_for_msvc\n"
"#endif\n\n";
}
void IntrinsicEmitter::EmitSuffix(raw_ostream &OS) {
OS << "#if defined(_MSC_VER) && defined(setjmp_undefined_for_msvc)\n"
"// let's return it to _setjmp state\n"
"# pragma pop_macro(\"setjmp\")\n"
"# undef setjmp_undefined_for_msvc\n"
"#endif\n\n";
}
void IntrinsicEmitter::EmitEnumInfo(const CodeGenIntrinsicTable &Ints,
raw_ostream &OS) {
// Find the TargetSet for which to generate enums. There will be an initial
@ -143,8 +118,6 @@ void IntrinsicEmitter::EmitEnumInfo(const CodeGenIntrinsicTable &Ints,
OS << "namespace llvm {\n";
OS << "namespace Intrinsic {\n";
OS << "enum " << UpperPrefix << "Intrinsics : unsigned {\n";
} else {
EmitPrefix(OS);
}
OS << "// Enum values for intrinsics\n";
@ -165,7 +138,6 @@ void IntrinsicEmitter::EmitEnumInfo(const CodeGenIntrinsicTable &Ints,
// Emit num_intrinsics into the target neutral enum.
if (IntrinsicPrefix.empty()) {
OS << " num_intrinsics = " << (Ints.size() + 1) << "\n";
EmitSuffix(OS);
} else {
OS << "}; // enum\n";
OS << "} // namespace Intrinsic\n";