Skip to content

Commit 1be468a

Browse files
committed
[Analysis] Add a doxygen comment to DebugInfoCache
1 parent d646191 commit 1be468a

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

llvm/include/llvm/Analysis/DebugInfoCache.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- llvm/Analysis/DebugInfoCache.h - debug info cache ---*- C++ -*-===//
1+
//===- llvm/Analysis/DebugInfoCache.h - debug info cache --------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,6 +18,13 @@
1818
#include "llvm/IR/PassManager.h"
1919

2020
namespace llvm {
21+
22+
/// Processes and caches debug info for each DICompileUnit in a module.
23+
///
24+
/// The result of the analysis is a set of DebugInfoFinders primed on their
25+
/// respective DICompileUnit. Such DebugInfoFinders can be used to speed up
26+
/// function cloning which otherwise requires an expensive traversal of
27+
/// DICompileUnit-level debug info. See an example usage in CoroSplit.
2128
class DebugInfoCache {
2229
public:
2330
using DIFinderCache = SmallDenseMap<const DICompileUnit *, DebugInfoFinder>;

llvm/lib/Analysis/DebugInfoCache.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- llvm/Analysis/DebugInfoCache.cpp - debug info cache ---*- C++ -*-===//
1+
//===- llvm/Analysis/DebugInfoCache.cpp - debug info cache ----------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

llvm/lib/Transforms/Utils/CloneFunction.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
316316
if (Changes == CloneFunctionChangeType::DifferentModule) {
317317
assert(NewFunc->getParent() &&
318318
"Need parent of new function to maintain debug info invariants");
319-
320319
}
321320
}
322321

llvm/unittests/Analysis/DebugInfoCacheTest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- DebugInfoCacheTest.cpp - DebugInfoCache unit tests ---*- C++ -*-===//
1+
//===- DebugInfoCacheTest.cpp - DebugInfoCache unit tests -----------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)