Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
34307c61
Commit
34307c61
authored
Dec 02, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around a clang-3.7 parsing bug.
parent
60644abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/gc/gc.h
src/gc/gc.h
+8
-2
No files found.
src/gc/gc.h
View file @
34307c61
...
...
@@ -212,6 +212,12 @@ public:
template
<
typename
T
>
class
UniqueScanningHandle
{
T
*
obj
=
NULL
;
// Compiler bug workaround:
// clang-3.7 crashes if we do 'delete obj' in the places that are now 'do_delete(obj)'.
// Using a wrapper function seems to avoid whatever the weird code path is hat causes the crash.
// https://llvm.org/bugs/show_bug.cgi?id=25700
static
void
do_delete
(
T
*
t
)
{
delete
t
;
}
public:
UniqueScanningHandle
(
T
*
obj
)
:
obj
(
obj
)
{
#if MOVING_GC
...
...
@@ -227,7 +233,7 @@ public:
threading
::
popGCObject
(
obj
);
}
#endif
d
elete
obj
;
d
o_delete
(
obj
)
;
}
T
*
operator
->
()
{
return
obj
;
}
...
...
@@ -238,7 +244,7 @@ public:
threading
::
popGCObject
(
obj
);
}
#endif
d
elete
obj
;
d
o_delete
(
obj
)
;
obj
=
t
;
#if MOVING_GC
if
(
t
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment