[llvm] [gSYM] Add support merged functions in gSYM format (PR #101604)

Greg Clayton via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 13:15:06 PDT 2024


================
@@ -0,0 +1,61 @@
+//===- MergedFunctionsInfo.h ------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_GSYM_MERGEDFUNCTIONSINFO_H
+#define LLVM_DEBUGINFO_GSYM_MERGEDFUNCTIONSINFO_H
+
+#include "llvm/DebugInfo/GSYM/ExtractRanges.h"
+#include "llvm/Support/Error.h"
+#include <stdint.h>
+#include <vector>
+
+namespace llvm {
+class raw_ostream;
+
+namespace gsym {
+
+class GsymReader;
+struct FunctionInfo;
+struct MergedFunctionsInfo {
+  std::vector<FunctionInfo> MergedFunctions;
+
+  void clear() { MergedFunctions.clear(); }
+
+  /// Query if a MergedFunctionsInfo object is valid.
+  ///
+  /// \returns A boolean indicating if this FunctionInfo is valid.
+  bool isValid() { return true; }
----------------
clayborg wrote:

Return true only if MergedFunctions isn't empty?
```
return !MergedFucntions.empty();
```

https://github.com/llvm/llvm-project/pull/101604


More information about the llvm-commits mailing list