Skip to content
  • Sean Callanan's avatar
    Updated the IRInterpreter to work with an · 08052afa
    Sean Callanan authored
    IRMemoryMap rather than through its own memory
    abstraction.  This considerably simplifies the
    code, and makes it possible to run the
    IRInterpreter multiple times on an already-parsed
    expression in the absence of a ClangExpressionDeclMap.
    
    Changes include:
    
      - ClangExpressionDeclMap's interface methods
        for the IRInterpreter now take IRMemoryMap
        arguments.  They are not long for this world,
        however, since the IRInterpreter will soon be
        working with materialized variables.
    
      - As mentioned above, removed the Memory class
        from the IR interpreter altogether.  It had a
        few functions that remain useful, such as
        keeping track of Values that have been placed
        in memory, so I moved those into methods on
        InterpreterStackFrame.
    
      - Changed IRInterpreter to work with lldb::addr_t
        rather than Memory::Region as its primary
        currency.
    
      - Fixed a bug in the IRMemoryMap where it did not
        report correct address byte size and byte order
        if no process was present, because it was using
        Target::GetDefaultArchitecture() rather than
        Target::GetArchitecture().
    
      - Made IRMemoryMap methods clear the Errors they
        receive before running.  Having to do this by
        hand is just annoying.
    
    The testsuite seems happy with these changes, but
    please let me know if you see problems (especially
    in use cases without a process).
    
    llvm-svn: 179675
    08052afa
Loading