clayborg added a comment.

Noticed another efficiency thing, see inlined comment.



================
Comment at: tools/intel-mpx/IntelMPXTablePlugin.cpp:37
+  ptr_str.insert(0, "&");
+  lldb::SBValue ptr_addr = frame.GetValueForVariablePath(ptr_str.c_str());
+  if (!ptr_addr.IsValid()) {
----------------
Actually you may not want to make a string like "&my->expr" as you can probably 
get away with:

```
lldb::SBValue ptr_addr = frame.GetValueForVariablePath(cptr).GetLoadAddress();
```

The SBValue::GetLoadAddress() will return the address of the value itself 
instead of having to conjure up a SBValue for it.


https://reviews.llvm.org/D29078



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to