[flang-commits] [flang] [flang]Add new intrinsic function backtrace and complete the TODO of abort (PR #117603)

via flang-commits flang-commits at lists.llvm.org
Tue Nov 26 10:23:45 PST 2024


================
@@ -29,6 +29,7 @@ NORETURN void RTNAME(ProgramEndStatement)(NO_ARGUMENTS);
 // Extensions
 NORETURN void RTNAME(Exit)(int status DEFAULT_VALUE(EXIT_SUCCESS));
 NORETURN void RTNAME(Abort)(NO_ARGUMENTS);
+void RTNAME(Backtrace)(NO_ARGUMENTS);
----------------
dty2 wrote:

Thank you for your suggestion. But I don't quite understand it, because as far as I know, this macro is used when the function will cause the program to terminate or will not return to the caller. The Backtrace built-in function itself does not cause the program to terminate, and this built-in function will return to the caller function to continue execution. Therefore, I don't think it is necessary to add this macro. Of course, if there is another reason, please let me know, and I will accept your suggestion.

https://github.com/llvm/llvm-project/pull/117603


More information about the flang-commits mailing list