Skip to content

Instantly share code, notes, and snippets.

@jgouly
Created May 23, 2014 21:12
Show Gist options
  • Save jgouly/7467ffd61fd92b23d5b7 to your computer and use it in GitHub Desktop.
Save jgouly/7467ffd61fd92b23d5b7 to your computer and use it in GitHub Desktop.
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 101b164..20ba455 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2271,7 +2271,7 @@ bool FunctionDecl::isMain() const {
const TranslationUnitDecl *tunit =
dyn_cast<TranslationUnitDecl>(getDeclContext()->getRedeclContext());
return tunit &&
- !tunit->getASTContext().getLangOpts().Freestanding &&
+ //!tunit->getASTContext().getLangOpts().Freestanding &&
isNamed(this, "main");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment