mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
If a module has a main, but it is defined externally, refuse to run it.
Attempting to run it will find lli's main, which isn't the desired effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ad17c9c9a
commit
48ba8221af
@ -85,7 +85,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
// EnvVars to determine envp.
|
||||
//
|
||||
Function *Fn = MP->getModule()->getMainFunction();
|
||||
if (!Fn) {
|
||||
if (!Fn || Fn->isExternal()) {
|
||||
std::cerr << "'main' function not found in module.\n";
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user