[llvm] [GSYM] Callsites: Add data format support and loading from YAML (PR #109781)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 13:21:08 PDT 2024
================
@@ -177,6 +179,16 @@ static void parseArgs(int argc, char **argv) {
LookupAddressesFromStdin = Args.hasArg(OPT_addresses_from_stdin);
StoreMergedFunctionInfo = Args.hasArg(OPT_merged_functions);
+
+ for (const llvm::opt::Arg *A : Args.filtered(OPT_callsites_from_yaml_EQ))
+ if (A->getValue() && A->getValue()[0] != '\0')
+ CallSiteYamlPaths.emplace_back(A->getValue());
----------------
alx32 wrote:
Multiple YAML is not a common use case - I can remove it since there is no test for it.
There is currently no validity checks for the YAML input. This means things like you can specify offsets outside the function code range, you can specify the same function multiple times, you can specify non-existent functions, etc ... and won't get errors. Multiple YAML identical YAML files would be same effect as one YAML file with duplicate entries (which currently we don't check).
Since this format is only for testing, I'm thinking it's not super critical to have strict error checking. If we want to add strict error checking, I think a separate PR would be better - for reduced complexity.
https://github.com/llvm/llvm-project/pull/109781
More information about the llvm-commits
mailing list