diff options
author | Sean Callanan <scallanan@apple.com> | 2011-07-30 02:42:06 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-07-30 02:42:06 +0000 |
commit | cc427fadec4aac05751e30ce42df87d3a4a63037 (patch) | |
tree | f766c31ddc18961aaeaa876b2c0525062efb9e7a /lldb/source/Expression/ClangExpressionParser.cpp | |
parent | fc1aa292ad7b8f332356486d461af818706fe1ad (diff) | |
download | bcm5719-llvm-cc427fadec4aac05751e30ce42df87d3a4a63037.tar.gz bcm5719-llvm-cc427fadec4aac05751e30ce42df87d3a4a63037.zip |
This change brings in the latest LLVM/Clang, and
completes the support in the LLDB expression parser
for incomplete types. Clang now imports types
lazily, and we complete those types as necessary.
Changes include:
- ClangASTSource now supports three APIs which it
passes to ClangExpressionDeclMap. CompleteType
completes a TagDecl or an ObjCInterfaceDecl when
needed; FindExternalVisibleDecls finds named
entities that are visible in the expression's
scope; and FindExternalLexicalDecls performs a
(potentially restricted) search for entities
inside a lexical scope like a namespace. These
changes mean that entities in namespaces should
work normally.
- The SymbolFileDWARF code for searching a context
for a specific name is now more general, and can
search arbitrary contexts.
- We are continuing to adapt our calls into LLVM
from interfaces that take start and end iterators
when accepting multiple items to interfaces that
use ArrayRef.
- I have cleaned up some code, especially our use
of namespaces.
This change is neutral for our testsuite and greatly
improves correctness for large programs (like Clang)
with complicated type systems. It should also lay
the groundwork for improving the expression parser's
performance as we are lazier and lazier about
providing type information.
llvm-svn: 136555
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 01095b50969..c8385c2bf94 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -123,7 +123,6 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case ASTPrint: return new ASTPrintAction(); case ASTDumpXML: return new ASTDumpXMLAction(); case ASTView: return new ASTViewAction(); - case BoostCon: return new BoostConAction(); case DumpRawTokens: return new DumpRawTokensAction(); case DumpTokens: return new DumpTokensAction(); case EmitAssembly: return new EmitAssemblyAction(); @@ -199,6 +198,7 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope, InitializeLLVM() { llvm::InitializeAllTargets(); llvm::InitializeAllAsmPrinters(); + llvm::InitializeAllTargetMCs(); } } InitializeLLVM; @@ -557,9 +557,7 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_allocation_addr, RecordingMemoryManager *jit_memory_manager = new RecordingMemoryManager(); std::string error_string; - - llvm::TargetMachine::setRelocationModel(llvm::Reloc::PIC_); - + #if defined (USE_STANDARD_JIT) m_execution_engine.reset(llvm::ExecutionEngine::createJIT (module, &error_string, @@ -571,11 +569,12 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_allocation_addr, EngineBuilder builder(module); builder.setEngineKind(EngineKind::JIT) .setErrorStr(&error_string) + .setRelocationModel(llvm::Reloc::PIC_) .setJITMemoryManager(jit_memory_manager) .setOptLevel(CodeGenOpt::Less) .setAllocateGVsWithCode(true) .setCodeModel(CodeModel::Small) - .setUseMCJIT(true); + .setUseMCJIT(true); m_execution_engine.reset(builder.create()); #endif |