[Lldb-commits] [lldb] r123787 - in /lldb/trunk: llvm.zip scripts/build-llvm.pl source/Core/FileSpec.cpp source/Expression/ClangASTSource.cpp source/Expression/ClangExpressionParser.cpp source/Symbol/ClangASTContext.cpp source/Symbol/ClangASTType.cpp
Sean Callanan
scallanan at apple.com
Tue Jan 18 15:32:06 PST 2011
Author: spyffe
Date: Tue Jan 18 17:32:05 2011
New Revision: 123787
URL: http://llvm.org/viewvc/llvm-project?rev=123787&view=rev
Log:
Updated to revision 123723 of LLVM, to bring in
support for minimal type import functionality.
Modified:
lldb/trunk/llvm.zip
lldb/trunk/scripts/build-llvm.pl
lldb/trunk/source/Core/FileSpec.cpp
lldb/trunk/source/Expression/ClangASTSource.cpp
lldb/trunk/source/Expression/ClangExpressionParser.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTType.cpp
Modified: lldb/trunk/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
Binary files - no diff available.
Modified: lldb/trunk/scripts/build-llvm.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-llvm.pl?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/scripts/build-llvm.pl (original)
+++ lldb/trunk/scripts/build-llvm.pl Tue Jan 18 17:32:05 2011
@@ -25,7 +25,7 @@
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 @@
"$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 @@
"$llvm_configuration/lib/libLLVMX86CodeGen.a",
"$llvm_configuration/lib/libLLVMX86Disassembler.a",
"$llvm_configuration/lib/libLLVMX86Info.a",
- "$llvm_configuration/lib/libclangChecker.a"
);
if (-l $llvm_dstroot)
Modified: lldb/trunk/source/Core/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpec.cpp?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileSpec.cpp (original)
+++ lldb/trunk/source/Core/FileSpec.cpp Tue Jan 18 17:32:05 2011
@@ -499,7 +499,9 @@
{
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.
Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Tue Jan 18 17:32:05 2011
@@ -225,16 +225,14 @@
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());
}
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Tue Jan 18 17:32:05 2011
@@ -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 @@
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();
}
}
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Jan 18 17:32:05 2011
@@ -912,7 +912,8 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 *
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=123787&r1=123786&r2=123787&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Tue Jan 18 17:32:05 2011
@@ -140,7 +140,7 @@
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 @@
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 @@
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;
More information about the lldb-commits
mailing list