Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
4e55acea
Commit
4e55acea
authored
8 years ago
by
Frederich Munch
Committed by
Axel Naumann
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Windows: Remove function pointer typedef polluting global scope.
parent
f5808f12
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interpreter/cling/lib/Interpreter/Interpreter.cpp
+11
-9
11 additions, 9 deletions
interpreter/cling/lib/Interpreter/Interpreter.cpp
with
11 additions
and
9 deletions
interpreter/cling/lib/Interpreter/Interpreter.cpp
+
11
−
9
View file @
4e55acea
...
@@ -359,20 +359,22 @@ namespace cling {
...
@@ -359,20 +359,22 @@ namespace cling {
#if defined(LLVM_ON_WIN32)
#if defined(LLVM_ON_WIN32)
// Windows specific: _onexit, _onexit_m, __dllonexit
// Windows specific: _onexit, _onexit_m, __dllonexit
if
(
NoRuntime
)
{
// Have to declare the function pointer types now and hope no conflicts.
#if !defined(_M_CEE)
#if !defined(_M_CEE)
Strm
<<
"typedef int (__cdecl* _onexit_t)(void)
\n
;
"
;
const
char
*
Spec
=
"__cdecl
"
;
#else
#else
Strm
<<
"typedef int (__clrcall* _onexit_t)(void)
\n
"
;
const
char
*
Spec
=
"__clrcall
"
;
#endif
#endif
}
Strm
<<
Linkage
<<
" "
<<
Spec
<<
" int (*__dllonexit("
Strm
<<
Linkage
<<
" _onexit_t __dllonexit(_onexit_t f, void**, void**) { "
<<
"int ("
<<
Spec
<<
" *f)(void**, void**), void**, void**))"
"__cxa_atexit((void(*)(void*))f, nullptr, __dso_handle); return f;}
\n
"
;
"(void**, void**) { "
"__cxa_atexit((void(*)(void*))f, nullptr, __dso_handle); return f;"
"}
\n
"
;
Globals
.
push_back
(
"__dllonexit"
);
Globals
.
push_back
(
"__dllonexit"
);
#if !defined(_M_CEE_PURE)
#if !defined(_M_CEE_PURE)
Strm
<<
Linkage
<<
" _onexit_t _onexit(_onexit_t f) { "
Strm
<<
Linkage
<<
" "
<<
Spec
<<
" int (*_onexit("
"__cxa_atexit((void(*)(void*))f, nullptr, __dso_handle); return f;}
\n
"
;
<<
"int ("
<<
Spec
<<
" *f)()))() { "
"__cxa_atexit((void(*)(void*))f, nullptr, __dso_handle); return f;"
"}
\n
"
;
Globals
.
push_back
(
"_onexit"
);
Globals
.
push_back
(
"_onexit"
);
#endif
#endif
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment