aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/gogo.cc')
-rw-r--r--gcc/go/gofrontend/gogo.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 9bd25fa..757758e 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -4511,7 +4511,7 @@ Build_recover_thunks::can_recover_arg(Location location)
static Named_object* builtin_return_address;
if (builtin_return_address == NULL)
builtin_return_address =
- Gogo::declare_builtin_rf_address("__builtin_return_address");
+ Gogo::declare_builtin_rf_address("__builtin_return_address", true);
Type* uintptr_type = Type::lookup_integer_type("uintptr");
static Named_object* can_recover;
@@ -4565,16 +4565,19 @@ Gogo::build_recover_thunks()
}
// Return a declaration for __builtin_return_address or
-// __builtin_frame_address.
+// __builtin_dwarf_cfa.
Named_object*
-Gogo::declare_builtin_rf_address(const char* name)
+Gogo::declare_builtin_rf_address(const char* name, bool hasarg)
{
const Location bloc = Linemap::predeclared_location();
Typed_identifier_list* param_types = new Typed_identifier_list();
- Type* uint32_type = Type::lookup_integer_type("uint32");
- param_types->push_back(Typed_identifier("l", uint32_type, bloc));
+ if (hasarg)
+ {
+ Type* uint32_type = Type::lookup_integer_type("uint32");
+ param_types->push_back(Typed_identifier("l", uint32_type, bloc));
+ }
Typed_identifier_list* return_types = new Typed_identifier_list();
Type* voidptr_type = Type::make_pointer_type(Type::make_void_type());