summaryrefslogtreecommitdiffstats
path: root/clang/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
commitdeb8448690c9a436e9fcbfb31dfe447f45c0c295 (patch)
tree8106e5e5d2c975c772cf10617e4ad0b9231a4ec2 /clang/lib/CodeGen/Mangle.cpp
parentfca896815d3e2d41bcfbf84a0b09c04240add3f0 (diff)
downloadbcm5719-llvm-deb8448690c9a436e9fcbfb31dfe447f45c0c295.tar.gz
bcm5719-llvm-deb8448690c9a436e9fcbfb31dfe447f45c0c295.zip
Disable all recognition of main() in -ffreestanding. Addresses bug #4720.
llvm-svn: 79070
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index 341e230e904..71b84e70013 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud