diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-15 20:59:31 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-15 20:59:31 +0000 |
commit | 5587803dfdb862d573289782f0c695872d9297a1 (patch) | |
tree | 0b9de0e19c29e543b18aa27250cebedb7a02ea63 /lib | |
parent | 23c608d6815f188cb0bd3444c9708383c6461036 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Decl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<TranslationUnitDecl>(getDeclContext()->getRedeclContext()); return tunit && - tunit->getASTContext().getLangOptions().Freestanding && + !tunit->getASTContext().getLangOptions().Freestanding && getIdentifier() && getIdentifier()->isStr("main"); } |