[cfe-commits] r131390 - /cfe/trunk/lib/AST/Decl.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Sun May 15 13:59:31 PDT 2011


Author: coppro
Date: Sun May 15 15:59:31 2011
New Revision: 131390

URL: http://llvm.org/viewvc/llvm-project?rev=131390&view=rev
Log:
main() exists in hosted, not freestanding implementations. Fixes the
build.

Modified:
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=131390&r1=131389&r2=131390&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sun May 15 15:59:31 2011
@@ -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");
 }





More information about the cfe-commits mailing list