[Lldb-commits] [lldb] r110088 - in /lldb/trunk/source/Expression: ClangExpression.cpp IRForTarget.cpp
Sean Callanan
scallanan at apple.com
Mon Aug 2 17:23:29 PDT 2010
Author: spyffe
Date: Mon Aug 2 19:23:29 2010
New Revision: 110088
URL: http://llvm.org/viewvc/llvm-project?rev=110088&view=rev
Log:
Set a CodeGenOption in Clang to inhibit insertion
of profiling code into expressions.
Modified IRForTarget to emit array and record
member accesses correctly. (Reading and writing
both work.)
Modified:
lldb/trunk/source/Expression/ClangExpression.cpp
lldb/trunk/source/Expression/IRForTarget.cpp
Modified: lldb/trunk/source/Expression/ClangExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpression.cpp?rev=110088&r1=110087&r2=110088&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpression.cpp Mon Aug 2 19:23:29 2010
@@ -245,6 +245,7 @@
// Set CodeGen options
m_clang_ap->getCodeGenOpts().EmitDeclMetadata = true;
+ m_clang_ap->getCodeGenOpts().InstrumentFunctions = false;
// Disable some warnings.
m_clang_ap->getDiagnosticOpts().Warnings.push_back("no-unused-value");
Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=110088&r1=110087&r2=110088&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Mon Aug 2 19:23:29 2010
@@ -247,6 +247,14 @@
{
lldb_private::Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS);
+ if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(V))
+ {
+ if (constant_expr->getOpcode() == Instruction::GetElementPtr)
+ {
+ Value *s = constant_expr->getOperand(0);
+ MaybeHandleVariable(M, s, Store);
+ }
+ }
if (GlobalVariable *global_variable = dyn_cast<GlobalVariable>(V))
{
clang::NamedDecl *named_decl = DeclForGlobalValue(M, global_variable);
More information about the lldb-commits
mailing list