diff options
-rw-r--r-- | lldb/scripts/build-llvm.pl | 4 | ||||
-rw-r--r-- | lldb/source/Core/FileSpec.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 16 | ||||
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 28 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTType.cpp | 6 |
6 files changed, 34 insertions, 28 deletions
diff --git a/lldb/scripts/build-llvm.pl b/lldb/scripts/build-llvm.pl index 01c4af6794e..b4e88231023 100644 --- a/lldb/scripts/build-llvm.pl +++ b/lldb/scripts/build-llvm.pl @@ -25,7 +25,7 @@ our @llvm_clang_slices; # paths to the single architecture static libraries (arc our $llvm_configuration = $ENV{LLVM_CONFIGURATION}; -our $llvm_revision = "121655"; +our $llvm_revision = "123723"; our $llvm_source_dir = "$ENV{SRCROOT}"; our $cc = "$ENV{DEVELOPER_BIN_DIR}/gcc-4.2"; our $cxx = "$ENV{DEVELOPER_BIN_DIR}/g++-4.2"; @@ -74,7 +74,6 @@ our @archive_files = ( "$llvm_configuration/lib/libLLVMScalarOpts.a", "$llvm_configuration/lib/libLLVMSelectionDAG.a", "$llvm_configuration/lib/libLLVMSupport.a", - "$llvm_configuration/lib/libLLVMSystem.a", "$llvm_configuration/lib/libLLVMTarget.a", "$llvm_configuration/lib/libLLVMTransformUtils.a", "$llvm_configuration/lib/libLLVMX86AsmParser.a", @@ -82,7 +81,6 @@ our @archive_files = ( "$llvm_configuration/lib/libLLVMX86CodeGen.a", "$llvm_configuration/lib/libLLVMX86Disassembler.a", "$llvm_configuration/lib/libLLVMX86Info.a", - "$llvm_configuration/lib/libclangChecker.a" ); if (-l $llvm_dstroot) diff --git a/lldb/source/Core/FileSpec.cpp b/lldb/source/Core/FileSpec.cpp index 3650a823a29..10963fef681 100644 --- a/lldb/source/Core/FileSpec.cpp +++ b/lldb/source/Core/FileSpec.cpp @@ -499,7 +499,9 @@ FileSpec::ResolveExecutableLocation () { const std::string file_str (m_filename.AsCString()); llvm::sys::Path path = llvm::sys::Program::FindProgramByName (file_str); - llvm::StringRef dir_ref = path.getDirname(); + const std::string &path_str = path.str(); + llvm::StringRef dir_ref = llvm::sys::path::parent_path(path_str); + //llvm::StringRef dir_ref = path.getDirname(); if (! dir_ref.empty()) { // FindProgramByName returns "." if it can't find the file. diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 3ef9e757965..b18536b5f9e 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -225,16 +225,14 @@ NameSearchContext::AddFunDecl (void *type) clang::NamedDecl * NameSearchContext::AddGenericFunDecl() { + FunctionProtoType::ExtProtoInfo proto_info; + + proto_info.Variadic = true; + QualType generic_function_type(m_ast_source.m_ast_context.getFunctionType (m_ast_source.m_ast_context.getSizeType(), // result - NULL, // argument types - 0, // number of arguments - true, // variadic? - 0, // type qualifiers - false, // has exception specification? - false, // has any exception specification? - 0, // number of exceptions - NULL, // exceptions - FunctionType::ExtInfo())); // defaults for noreturn, regparm, calling convention + NULL, // argument types + 0, // number of arguments + proto_info)); return AddFunDecl(generic_function_type.getAsOpaquePtr()); } diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index adc5a9ecb7e..0a63e4daaf2 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -30,7 +30,6 @@ #include "clang/Basic/FileManager.h" #include "clang/Basic/TargetInfo.h" #include "clang/Basic/Version.h" -#include "clang/Checker/FrontendActions.h" #include "clang/CodeGen/CodeGenAction.h" #include "clang/CodeGen/ModuleBuilder.h" #include "clang/Driver/CC1Options.h" @@ -47,6 +46,7 @@ #include "clang/Parse/ParseAST.h" #include "clang/Rewrite/FrontendActions.h" #include "clang/Sema/SemaConsumer.h" +#include "clang/StaticAnalyzer/FrontendActions.h" #include "llvm/ADT/StringRef.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" @@ -153,7 +153,7 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case RewriteMacros: return new RewriteMacrosAction(); case RewriteObjC: return new RewriteObjCAction(); case RewriteTest: return new RewriteTestAction(); - case RunAnalysis: return new AnalysisAction(); + //case RunAnalysis: return new AnalysisAction(); case RunPreprocessorOnly: return new PreprocessOnlyAction(); } } diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 41cddb0ca87..0ec29b9a8f2 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -912,7 +912,8 @@ ClangASTContext::CopyType (ASTContext *dst_ast, FileSystemOptions file_system_options; FileManager file_manager (file_system_options); ASTImporter importer(*dst_ast, file_manager, - *src_ast, file_manager); + *src_ast, file_manager, + false); QualType src (QualType::getFromOpaquePtr(clang_type)); QualType dst (importer.Import(src)); @@ -929,7 +930,8 @@ ClangASTContext::CopyDecl (ASTContext *dst_ast, FileSystemOptions file_system_options; FileManager file_manager (file_system_options); ASTImporter importer(*dst_ast, file_manager, - *src_ast, file_manager); + *src_ast, file_manager, + false); return importer.Import(source_decl); } @@ -1629,7 +1631,8 @@ ClangASTContext::CreateBaseClassSpecifier (clang_type_t base_class_type, AccessT is_virtual, base_of_class, ConvertAccessTypeToAccessSpecifier (access), - getASTContext()->CreateTypeSourceInfo (QualType::getFromOpaquePtr(base_class_type))); + getASTContext()->CreateTypeSourceInfo (QualType::getFromOpaquePtr(base_class_type)), + SourceLocation()); return NULL; } @@ -2278,6 +2281,7 @@ ClangASTContext::GetNumPointeeChildren (clang_type_t clang_type) case clang::BuiltinType::Bool: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: + case clang::BuiltinType::WChar_U: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::UShort: @@ -2287,7 +2291,7 @@ ClangASTContext::GetNumPointeeChildren (clang_type_t clang_type) case clang::BuiltinType::UInt128: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: - case clang::BuiltinType::WChar: + case clang::BuiltinType::WChar_S: case clang::BuiltinType::Short: case clang::BuiltinType::Int: case clang::BuiltinType::Long: @@ -3562,16 +3566,18 @@ ClangASTContext::CreateFunctionType (ASTContext *ast, qual_type_args.push_back (QualType::getFromOpaquePtr(args[i])); // TODO: Detect calling convention in DWARF? + FunctionProtoType::ExtProtoInfo proto_info; + proto_info.Variadic = is_variadic; + proto_info.HasExceptionSpec = false; + proto_info.HasAnyExceptionSpec = false; + proto_info.TypeQuals = type_quals; + proto_info.NumExceptions = 0; + proto_info.Exceptions = NULL; + return ast->getFunctionType(QualType::getFromOpaquePtr(result_type), qual_type_args.empty() ? NULL : &qual_type_args.front(), qual_type_args.size(), - is_variadic, - type_quals, - false, // hasExceptionSpec - false, // hasAnyExceptionSpec, - 0, // NumExs - 0, // const QualType *ExArray - FunctionType::ExtInfo ()).getAsOpaquePtr(); // NoReturn); + proto_info).getAsOpaquePtr(); // NoReturn); } ParmVarDecl * diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp index f6a61dcfa04..6f6afdebf7d 100644 --- a/lldb/source/Symbol/ClangASTType.cpp +++ b/lldb/source/Symbol/ClangASTType.cpp @@ -140,7 +140,7 @@ ClangASTType::GetEncoding (clang_type_t clang_type, uint32_t &count) case clang::BuiltinType::Bool: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: - case clang::BuiltinType::WChar: + case clang::BuiltinType::WChar_S: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::Short: @@ -151,6 +151,7 @@ ClangASTType::GetEncoding (clang_type_t clang_type, uint32_t &count) case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: + case clang::BuiltinType::WChar_U: case clang::BuiltinType::UShort: case clang::BuiltinType::UInt: case clang::BuiltinType::ULong: @@ -249,9 +250,10 @@ ClangASTType::GetFormat (clang_type_t clang_type) case clang::BuiltinType::Bool: return lldb::eFormatBoolean; case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: + case clang::BuiltinType::WChar_S: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: - case clang::BuiltinType::WChar: return lldb::eFormatChar; + case clang::BuiltinType::WChar_U: return lldb::eFormatChar; case clang::BuiltinType::Char16: return lldb::eFormatUnicode16; case clang::BuiltinType::Char32: return lldb::eFormatUnicode32; case clang::BuiltinType::UShort: return lldb::eFormatUnsigned; |