summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRExecutionUnit.cpp
diff options
context:
space:
mode:
authorLuke Drummond <luke.drummond@codeplay.com>2016-12-19 17:22:44 +0000
committerLuke Drummond <luke.drummond@codeplay.com>2016-12-19 17:22:44 +0000
commitf5bb1d6c4e8c96d8fa0b5cec47a68f8b06d025fd (patch)
treeb03d3199e198f30ab32541b400c9dd546a09fbef /lldb/source/Expression/IRExecutionUnit.cpp
parent2e03213f90b0c443a4f3415757e8893d70420a85 (diff)
downloadbcm5719-llvm-f5bb1d6c4e8c96d8fa0b5cec47a68f8b06d025fd.tar.gz
bcm5719-llvm-f5bb1d6c4e8c96d8fa0b5cec47a68f8b06d025fd.zip
Expression evaluation for overloaded C functions (redux)
This is a redux of [Ewan's patch](https://reviews.llvm.org/D17957) , refactored to properly substitute primitive types using a hook in the itanium demangler, and updated after the previous patch went stale The new `SubsPrimitiveParmItanium` function takes a symbol name and replacement primitive type parameter as before but parses it using the FastDemangler, which has been modified to be able to notify clients of parse events (primitive types at this point). Additionally, we now use a `set` of `ConstStrings` instead of a `vector` so that we don't try and resolve the same invalid candidate multiple times. Differential Revision: https://reviews.llvm.org/D27223 Subscribers: lldb-commits llvm-svn: 290117
Diffstat (limited to 'lldb/source/Expression/IRExecutionUnit.cpp')
-rw-r--r--lldb/source/Expression/IRExecutionUnit.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 9ad2b33ce71..f18d96bd9e2 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -776,22 +776,9 @@ void IRExecutionUnit::CollectCandidateCPlusPlusNames(
}
}
- // Maybe we're looking for a const symbol but the debug info told us it was
- // const...
- if (!strncmp(name.GetCString(), "_ZN", 3) &&
- strncmp(name.GetCString(), "_ZNK", 4)) {
- std::string fixed_scratch("_ZNK");
- fixed_scratch.append(name.GetCString() + 3);
- CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
- }
-
- // Maybe we're looking for a static symbol but we thought it was global...
- if (!strncmp(name.GetCString(), "_Z", 2) &&
- strncmp(name.GetCString(), "_ZL", 3)) {
- std::string fixed_scratch("_ZL");
- fixed_scratch.append(name.GetCString() + 2);
- CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
- }
+ std::set<ConstString> alternates;
+ CPlusPlusLanguage::FindAlternateFunctionManglings(name, alternates);
+ CPP_specs.insert(CPP_specs.end(), alternates.begin(), alternates.end());
}
}
OpenPOWER on IntegriCloud