diff options
author | Chris Lattner <sabre@nondot.org> | 2009-06-30 01:26:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-06-30 01:26:17 +0000 |
commit | e4f2142d00fa5fdb580c4e2413da91882d955381 (patch) | |
tree | cf2362c9a9e3df03e7e52fe620d2e83a7b66094d /lib/AST/ASTContext.cpp | |
parent | 16dbdce02366c372fe934c0528148fc38906f21a (diff) |
Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.
This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.
One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 7683d5a160..fc78842d1a 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -38,11 +38,10 @@ ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, GlobalNestedNameSpecifier(0), CFConstantStringTypeDecl(0), ObjCFastEnumerationStateTypeDecl(0), SourceMgr(SM), LangOpts(LOpts), FreeMemory(FreeMem), Target(t), Idents(idents), Selectors(sels), - BuiltinInfo(builtins), ExternalSource(0) { + BuiltinInfo(builtins), ExternalSource(0), PrintingPolicy(LOpts) { if (size_reserve > 0) Types.reserve(size_reserve); InitBuiltinTypes(); TUDecl = TranslationUnitDecl::Create(*this); - PrintingPolicy.CPlusPlus = LangOpts.CPlusPlus; } ASTContext::~ASTContext() { |