summaryrefslogtreecommitdiff
path: root/objectivec
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-06-24 17:55:48 -0400
committerAlexander Taylor <alex@vector35.com>2025-06-25 18:36:47 -0400
commitc41f264a1dba68c89b4a224a70e3a5783f7fa879 (patch)
tree00bb6e91d86b708bff7265ed7179a6ef2793b7fb /objectivec
parentb1a7666164a000c5255f90568ed9597b58ce276a (diff)
Remove implicit conversions from Confidence to underlying type, these can cause bugs and also issues with C++20
Diffstat (limited to 'objectivec')
-rw-r--r--objectivec/objc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/objectivec/objc.cpp b/objectivec/objc.cpp
index da531e80..a34cffe1 100644
--- a/objectivec/objc.cpp
+++ b/objectivec/objc.cpp
@@ -343,7 +343,7 @@ void ObjCProcessor::DefineObjCSymbol(
new Symbol(type, shortName, fullName, name, addr, LocalBinding, nameSpace), typeRef);
};
- auto defineSymbol = [this](Ref<Symbol> symbol, Ref<Type> type) {
+ auto defineSymbol = [this](Ref<Symbol> symbol, const Confidence<Ref<Type>>& type) {
uint64_t symbolAddress = symbol->GetAddress();
// Armv7/Thumb: This will rewrite the symbol's address.
// e.g. We pass in 0xc001, it will rewrite it to 0xc000 and create the function w/ the "thumb2" arch.
@@ -354,8 +354,8 @@ void ObjCProcessor::DefineObjCSymbol(
{
// For thumb2 we want to get the adjusted address, we can do that using the target function.
Ref<Function> targetFunction = m_data->GetAnalysisFunction(targetPlatform, symbolAddress);
- if (targetFunction && type)
- targetFunction->ApplyAutoDiscoveredType(type);
+ if (targetFunction && type.GetValue())
+ targetFunction->ApplyAutoDiscoveredType(type.GetValue());
auto adjustedSym = new Symbol(FunctionSymbol, symbol->GetShortName(), symbol->GetFullName(), symbol->GetRawName(), symbolAddress);
m_data->DefineAutoSymbol(adjustedSym);