aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-08-15 02:09:25 +0000
committerJohn McCall <rjmccall@apple.com>2009-08-15 02:09:25 +0000
commit07a5c22bb6fb0674c95205ae189365bf8e1b695e (patch)
tree65165508917e7a1e73b1edf3238c547bc1818744 /lib/CodeGen/Mangle.cpp
parent2cff7d16fe58e6d6447ec9cad2af083beb20d6b5 (diff)
Disable all recognition of main() in -ffreestanding. Addresses bug #4720.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 341e230e90..71b84e7001 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -91,7 +91,7 @@ bool CXXNameMangler::mangleFunctionDecl(const FunctionDecl *FD) {
// name mangling (always).
if (!FD->hasAttr<OverloadableAttr>()) {
// C functions are not mangled, and "main" is never mangled.
- if (!Context.getLangOptions().CPlusPlus || FD->isMain())
+ if (!Context.getLangOptions().CPlusPlus || FD->isMain(Context))
return false;
// No mangling in an "implicit extern C" header.