main() exists in hosted, not freestanding implementations. Fixes the
build.
llvm-svn: 131390
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 1e98998..ec11838 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1478,7 +1478,7 @@
const TranslationUnitDecl *tunit =
dyn_cast<TranslationUnitDecl>(getDeclContext()->getRedeclContext());
return tunit &&
- tunit->getASTContext().getLangOptions().Freestanding &&
+ !tunit->getASTContext().getLangOptions().Freestanding &&
getIdentifier() &&
getIdentifier()->isStr("main");
}