Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
da469ecb
Commit
da469ecb
authored
11 years ago
by
NAKAMURA Takumi
Browse files
Options
Downloads
Patches
Plain Diff
lli/RemoteMemoryManager.cpp: Resurrect __main stuff removed in r192504 to unbreak mingw32.
llvm-svn: 193472
parent
853b460e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/tools/lli/RemoteMemoryManager.cpp
+16
-0
16 additions, 0 deletions
llvm/tools/lli/RemoteMemoryManager.cpp
llvm/tools/lli/RemoteMemoryManager.h
+1
-1
1 addition, 1 deletion
llvm/tools/lli/RemoteMemoryManager.h
with
17 additions
and
1 deletion
llvm/tools/lli/RemoteMemoryManager.cpp
+
16
−
0
View file @
da469ecb
...
@@ -204,3 +204,19 @@ uint8_t *RemoteMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment)
...
@@ -204,3 +204,19 @@ uint8_t *RemoteMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment)
void
RemoteMemoryManager
::
deallocateFunctionBody
(
void
*
Body
)
{
void
RemoteMemoryManager
::
deallocateFunctionBody
(
void
*
Body
)
{
llvm_unreachable
(
"Unexpected!"
);
llvm_unreachable
(
"Unexpected!"
);
}
}
static
int
jit_noop
()
{
return
0
;
}
uint64_t
RemoteMemoryManager
::
getSymbolAddress
(
const
std
::
string
&
Name
)
{
// We should not invoke parent's ctors/dtors from generated main()!
// On Mingw and Cygwin, the symbol __main is resolved to
// callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
// (and register wrong callee's dtors with atexit(3)).
// We expect ExecutionEngine::runStaticConstructorsDestructors()
// is called before ExecutionEngine::runFunctionAsMain() is called.
if
(
Name
==
"__main"
)
return
(
uintptr_t
)
&
jit_noop
;
return
0
;
}
This diff is collapsed.
Click to expand it.
llvm/tools/lli/RemoteMemoryManager.h
+
1
−
1
View file @
da469ecb
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
// interface does support this, but clients must provide their own
// interface does support this, but clients must provide their own
// mechanism for finding remote symbol addresses. MCJIT will resolve
// mechanism for finding remote symbol addresses. MCJIT will resolve
// symbols from Modules it contains.
// symbols from Modules it contains.
uint64_t
getSymbolAddress
(
const
std
::
string
&
Name
)
{
return
0
;
}
uint64_t
getSymbolAddress
(
const
std
::
string
&
Name
)
;
void
notifyObjectLoaded
(
ExecutionEngine
*
EE
,
const
ObjectImage
*
Obj
);
void
notifyObjectLoaded
(
ExecutionEngine
*
EE
,
const
ObjectImage
*
Obj
);
...
...
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