[Lldb-commits] [lldb] r368442 - [lldb][NFC] Remove unused IRForTarget::BuildRelocation
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 9 07:21:28 PDT 2019
Author: teemperor
Date: Fri Aug 9 07:21:27 2019
New Revision: 368442
URL: http://llvm.org/viewvc/llvm-project?rev=368442&view=rev
Log:
[lldb][NFC] Remove unused IRForTarget::BuildRelocation
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=368442&r1=368441&r2=368442&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Fri Aug 9 07:21:27 2019
@@ -1896,28 +1896,6 @@ bool IRForTarget::ReplaceVariables(Funct
return true;
}
-llvm::Constant *IRForTarget::BuildRelocation(llvm::Type *type,
- uint64_t offset) {
- llvm::Constant *offset_int = ConstantInt::get(m_intptr_ty, offset);
-
- llvm::Constant *offset_array[1];
-
- offset_array[0] = offset_int;
-
- llvm::ArrayRef<llvm::Constant *> offsets(offset_array, 1);
- llvm::Type *char_type = llvm::Type::getInt8Ty(m_module->getContext());
- llvm::Type *char_pointer_type = char_type->getPointerTo();
-
- llvm::Constant *reloc_placeholder_bitcast =
- ConstantExpr::getBitCast(m_reloc_placeholder, char_pointer_type);
- llvm::Constant *reloc_getelementptr = ConstantExpr::getGetElementPtr(
- char_type, reloc_placeholder_bitcast, offsets);
- llvm::Constant *reloc_bitcast =
- ConstantExpr::getBitCast(reloc_getelementptr, type);
-
- return reloc_bitcast;
-}
-
bool IRForTarget::runOnModule(Module &llvm_module) {
lldb_private::Log *log(
lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h?rev=368442&r1=368441&r2=368442&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h Fri Aug 9 07:21:27 2019
@@ -539,20 +539,6 @@ private:
FunctionValueCache &entry_instruction_finder,
lldb_private::Stream &error_stream);
- /// Construct a reference to m_reloc_placeholder with a given type and
- /// offset. This typically happens after inserting data into
- /// m_data_allocator.
- ///
- /// \param[in] type
- /// The type of the value being loaded.
- ///
- /// \param[in] offset
- /// The offset of the value from the base of m_data_allocator.
- ///
- /// \return
- /// The Constant for the reference, usually a ConstantExpr.
- llvm::Constant *BuildRelocation(llvm::Type *type, uint64_t offset);
-
/// Commit the allocation in m_data_allocator and use its final location to
/// replace m_reloc_placeholder.
///
More information about the lldb-commits
mailing list