From: Sean Hunt Date: Sun, 15 May 2011 20:59:31 +0000 (+0000) Subject: main() exists in hosted, not freestanding implementations. Fixes the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5587803dfdb862d573289782f0c695872d9297a1;p=clang main() exists in hosted, not freestanding implementations. Fixes the build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131390 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 1e98998002..ec11838c84 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1478,7 +1478,7 @@ bool FunctionDecl::isMain() const { const TranslationUnitDecl *tunit = dyn_cast(getDeclContext()->getRedeclContext()); return tunit && - tunit->getASTContext().getLangOptions().Freestanding && + !tunit->getASTContext().getLangOptions().Freestanding && getIdentifier() && getIdentifier()->isStr("main"); }