Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:51

0001 //===-- ScriptObject.h ------------------------------------ -*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_INTERPRETER_SCRIPTOBJECT_H
0010 #define LLDB_INTERPRETER_SCRIPTOBJECT_H
0011 
0012 #include "lldb/lldb-types.h"
0013 
0014 namespace lldb_private {
0015 class ScriptObject {
0016 public:
0017   ScriptObject(lldb::ScriptObjectPtr ptr, lldb::ScriptLanguage lang)
0018       : m_ptr(ptr), m_language(lang) {}
0019 
0020   operator bool() const { return m_ptr != nullptr; }
0021 
0022   const void *GetPointer() const { return m_ptr; }
0023 
0024   lldb::ScriptLanguage GetLanguage() const { return m_language; }
0025 
0026 private:
0027   const void *m_ptr;
0028   lldb::ScriptLanguage m_language;
0029 };
0030 } // namespace lldb_private
0031 
0032 #endif // LLDB_INTERPRETER_SCRIPTOBJECT_H