summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-17 20:45:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-17 20:45:01 +0000
commit706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch)
tree4adf86a776049cbf7f69a1929c4babcbbef925eb /lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
parent7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff)
Notes
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h74
1 files changed, 25 insertions, 49 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
index 893620f7f8e0a..262e8ee0c06c6 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
@@ -71,15 +71,6 @@ public:
/// variables) should be resolved. If not, only external functions
/// are resolved.
///
- /// \param[in] execution_policy
- /// Determines whether an IR interpreter can be used to statically
- /// evaluate the expression.
- ///
- /// \param[in] const_result
- /// This variable is populated with the statically-computed result
- /// of the function, if it has no side-effects and the result can
- /// be computed statically.
- ///
/// \param[in] execution_unit
/// The holder for raw data associated with the expression.
///
@@ -105,10 +96,6 @@ public:
/// $__lldb_expr, and that function is passed to the passes one by
/// one.
///
- /// \param[in] interpreter_error
- /// An error. If the expression fails to be interpreted, this error
- /// is set to a reason why.
- ///
/// \return
/// True on success; false otherwise
bool runOnModule(llvm::Module &llvm_module) override;
@@ -142,9 +129,6 @@ private:
/// The top-level pass implementation
///
- /// \param[in] llvm_module
- /// The module currently being processed.
- ///
/// \param[in] llvm_function
/// The function currently being processed.
///
@@ -184,12 +168,12 @@ private:
/// Find the NamedDecl corresponding to a Value. This interface is exposed
/// for the IR interpreter.
///
+ /// \param[in] global_val
+ /// The global entity to search for
+ ///
/// \param[in] module
/// The module containing metadata to search
///
- /// \param[in] global
- /// The global entity to search for
- ///
/// \return
/// The corresponding variable declaration
public:
@@ -287,7 +271,7 @@ private:
/// Replace a single old-style class reference
///
- /// \param[in] selector_load
+ /// \param[in] class_load
/// The load of the statically-allocated selector.
///
/// \return
@@ -362,7 +346,7 @@ private:
/// Handle all the arguments to a function call
///
- /// \param[in] C
+ /// \param[in] call_inst
/// The call instruction.
///
/// \return
@@ -381,8 +365,8 @@ private:
/// Remove calls to __cxa_atexit, which should never be generated by
/// expressions.
///
- /// \param[in] call_inst
- /// The call instruction.
+ /// \param[in] basic_block
+ /// The basic block currently being processed.
///
/// \return
/// True if the scan was successful; false if some operation
@@ -391,7 +375,7 @@ private:
/// The top-level pass implementation
///
- /// \param[in] basic_block
+ /// \param[in] llvm_function
/// The function currently being processed.
///
/// \return
@@ -474,28 +458,9 @@ private:
///pointer (see comments in
/// ASTResultSynthesizer::SynthesizeBodyResult)
- llvm::GlobalVariable *m_reloc_placeholder; ///< A placeholder that will be
- ///replaced by a pointer to the
- ///final
- /// location of the static allocation.
-
- /// UnfoldConstant operates on a constant [Old] which has just been replaced
- /// with a value [New]. We assume that new_value has been properly placed
- /// early in the function, in front of the first instruction in the entry
- /// basic block [FirstEntryInstruction].
- ///
- /// UnfoldConstant reads through the uses of Old and replaces Old in those
- /// uses with New. Where those uses are constants, the function generates
- /// new instructions to compute the result of the new, non-constant
- /// expression and places them before FirstEntryInstruction. These
- /// instructions replace the constant uses, so UnfoldConstant calls itself
- /// recursively for those.
- ///
- /// \param[in] llvm_function
- /// The function currently being processed.
- ///
- /// \return
- /// True on success; false otherwise
+ /// A placeholder that will be replaced by a pointer to the final location of
+ /// the static allocation.
+ llvm::GlobalVariable *m_reloc_placeholder;
class FunctionValueCache {
public:
@@ -513,6 +478,20 @@ private:
FunctionValueCache m_entry_instruction_finder;
+ /// UnfoldConstant operates on a constant [Old] which has just been replaced
+ /// with a value [New]. We assume that new_value has been properly placed
+ /// early in the function, in front of the first instruction in the entry
+ /// basic block [FirstEntryInstruction].
+ ///
+ /// UnfoldConstant reads through the uses of Old and replaces Old in those
+ /// uses with New. Where those uses are constants, the function generates
+ /// new instructions to compute the result of the new, non-constant
+ /// expression and places them before FirstEntryInstruction. These
+ /// instructions replace the constant uses, so UnfoldConstant calls itself
+ /// recursively for those.
+ ///
+ /// \return
+ /// True on success; false otherwise
static bool UnfoldConstant(llvm::Constant *old_constant,
llvm::Function *llvm_function,
FunctionValueCache &value_maker,
@@ -522,9 +501,6 @@ private:
/// Commit the allocation in m_data_allocator and use its final location to
/// replace m_reloc_placeholder.
///
- /// \param[in] module
- /// The module that m_data_allocator resides in
- ///
/// \return
/// True on success; false otherwise
bool CompleteDataAllocation();