summaryrefslogtreecommitdiff
path: root/lib/Linker/LinkArchives.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Linker/LinkArchives.cpp')
-rw-r--r--lib/Linker/LinkArchives.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index d00e1f2467..8186e7b4d1 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -43,7 +43,7 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
// If the program doesn't define a main, try pulling one in from a .a file.
// This is needed for programs where the main function is defined in an
// archive, such f2c'd programs.
- Function *Main = M->getMainFunction();
+ Function *Main = M->getFunction("main");
if (Main == 0 || Main->isDeclaration())
UndefinedSymbols.insert("main");