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 | 69c7951c8ea55e31d07b05a6bf4e0d715816fc04 (patch) | |
tree | 21fdb0f3c10c4a6fb174a1170835f358d62c5592 /clang/lib/AST/ASTContext.cpp | |
parent | 6bae7a1b2ae47b62da1fd0b3b3e1b659807b3c76 (diff) | |
download | bcm5719-llvm-69c7951c8ea55e31d07b05a6bf4e0d715816fc04.tar.gz bcm5719-llvm-69c7951c8ea55e31d07b05a6bf4e0d715816fc04.zip |
Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586
llvm-svn: 64566
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 652fcdf8080..f724524f028 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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); } |