5 Commits

Author SHA1 Message Date
Dave Lee
e424787a95
[lldb] Add templated CompilerType::GetTypeSystem (NFC) (#140424)
Add an overloaded `GetTypeSystem` to specify the expected type system subclass. Changes code from  `GetTypeSystem().dyn_cast_or_null<TypeSystemClang>()` to `GetTypeSystem<TypeSystemClang>()`.
2025-05-21 12:03:58 -07:00
Augusto Noronha
9d5edc9a0d
[lldb][NFC] Replace GetLocalBufferSize() with GetLocalBuffer() (#126333) 2025-02-07 19:12:35 -08:00
David Spickett
52db30ec41 [lldb] Fix compiler error in ValueObject tests
Fixes 0cbc4983adcdbbd85ccb38b2dfbfe5985367b1b2.

error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
   71 |                     in_value.GetLocalBufferSize()};
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given this is test code, I think a static cast is fine here.

Tiny risk that it's actually a symptom of a bug that would
happen if you did 32-bit to 64-bit debugging. I expect you'd
find a lot more bugs than that though.
2025-02-07 10:29:35 +00:00
David Spickett
9d83790d17 [lldb] Fix build error in ValueObject test
Fixes 0cbc4983adcdbbd85ccb38b2dfbfe5985367b1b2.

llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp(221): error C2065: 'u_int8_t': undeclared identifier
2025-02-07 10:03:23 +00:00
Augusto Noronha
0cbc4983ad
[lldb] Make ValueObjectDynamicValue::UpdateValue() point to a host b… (#125143)
…uffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type
found by GetDynamicTypeAndAddress() would return an address in the
inferior. This commit makes it so it can deal with being passed a host
address instead.

This is needed downstream by the Swift fork.

rdar://143357274
2025-02-06 19:04:01 -08:00