Use different allocation when memory can not contain pointers.
R=iant
https://golang.org/cl/1849044
diff --git a/go/unsafe.cc b/go/unsafe.cc
index 437829f..51d812b 100644
--- a/go/unsafe.cc
+++ b/go/unsafe.cc
@@ -18,9 +18,6 @@
{
location_t bloc = BUILTINS_LOCATION;
- // Importing the "unsafe" package automatically disables TBAA.
- flag_strict_aliasing = false;
-
bool add_to_globals;
Package* package = this->add_imported_package("unsafe", local_name,
is_local_name_exported,
@@ -132,4 +129,6 @@
no = bindings->add_function_declaration("NewArray", package, fntype, bloc);
if (add_to_globals)
this->add_named_object(no);
+
+ this->imported_unsafe_ = true;
}