[Lldb-commits] [lldb] r172039 - in /lldb/trunk/source/Symbol: ClangASTContext.cpp ClangASTType.cpp
Enrico Granata
egranata at apple.com
Wed Jan 9 18:37:22 PST 2013
Author: enrico
Date: Wed Jan 9 20:37:22 2013
New Revision: 172039
URL: http://llvm.org/viewvc/llvm-project?rev=172039&view=rev
Log:
<rdar://problem/11146929>
Enabling support for the wchar_t type.
Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int
This patch enables the correct options to make sure that we report wchar_t as itself
Added a test case to make sure we do not regress
Adding files missing from the previous commit
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTType.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=172039&r1=172038&r2=172039&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Jan 9 20:37:22 2013
@@ -266,6 +266,8 @@
Opts.GNUInline = !Std.isC99();
Opts.HexFloats = Std.hasHexFloats();
Opts.ImplicitInt = Std.hasImplicitInt();
+
+ Opts.WChar = true;
// OpenCL has some additional defaults.
if (LangStd == LangStandard::lang_opencl) {
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=172039&r1=172038&r2=172039&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Wed Jan 9 20:37:22 2013
@@ -58,6 +58,7 @@
clang::PrintingPolicy printing_policy (ast->getPrintingPolicy());
printing_policy.SuppressTagKeyword = true;
+ printing_policy.LangOpts.WChar = true;
const clang::TypedefType *typedef_type = qual_type->getAs<clang::TypedefType>();
if (typedef_type)
{
More information about the lldb-commits
mailing list