diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-14 20:49:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-14 20:49:29 +0000 |
commit | 3573c0c0b44a1ac8f76a00af1bc75e94ca03d704 (patch) | |
tree | a73b7dbfd0dad96b6848adaf47fbb6f9a76facf7 /lib/AST/ASTContext.cpp | |
parent | 19891b082be53204ec91da31aee902966508c6d8 (diff) |
Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 652fcdf808..f724524f02 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -39,7 +39,7 @@ ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, { if (size_reserve > 0) Types.reserve(size_reserve); InitBuiltinTypes(); - BuiltinInfo.InitializeBuiltins(idents, Target); + BuiltinInfo.InitializeBuiltins(idents, Target, LangOpts.Freestanding); TUDecl = TranslationUnitDecl::Create(*this); } |