summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-14 20:49:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-14 20:49:29 +0000
commit69c7951c8ea55e31d07b05a6bf4e0d715816fc04 (patch)
tree21fdb0f3c10c4a6fb174a1170835f358d62c5592 /clang/lib/AST/ASTContext.cpp
parent6bae7a1b2ae47b62da1fd0b3b3e1b659807b3c76 (diff)
downloadbcm5719-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.cpp2
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);
}
OpenPOWER on IntegriCloud