Currently ExecutionContext::GetByteOrder() always returns the host byte order. This seems like a simple mistake: the return keyword appears to have been omitted by accident. This patch fixes that and adds a unit test.
Fixes https://llvm.org/PR37950
Differential D48704
[ExecutionContext] Return the target/process byte order. JDevlieghere on Jun 27 2018, 9:56 PM. Authored by
Details Currently ExecutionContext::GetByteOrder() always returns the host byte order. This seems like a simple mistake: the return keyword appears to have been omitted by accident. This patch fixes that and adds a unit test. Fixes https://llvm.org/PR37950
Diff Detail
Event TimelineComment Actions Do we have a test case for different target byte orders that could be used as a test template here? Otherwise I would just merge this in as the previous behavior of this function was clearly wrong. Comment Actions Sorry, I don't have a test case for this and I am yet to understand lldb test suite to create one. Comment Actions Should be easy to write unit test for ExecutionContext.cpp. See FileSpecTest.cpp for how to implement a unit test for a .cpp file. Comment Actions Thanks for setting this up. The infrastructure is a bit overkill for a simple test like this, but hopefully this can be useful for other tests too. I have a bunch of comments, but hopefully none of them are major, so if you agree with all of them, just fire away..
|