[clang-tools-extra] 20b2af3 - [clangd][NFC] Add traces for PreamblePatch::create
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri May 29 05:00:38 PDT 2020
Author: Kadir Cetinkaya
Date: 2020-05-29T14:00:08+02:00
New Revision: 20b2af3e5559e50d1b5279311c6e5034a2d1928d
URL: https://github.com/llvm/llvm-project/commit/20b2af3e5559e50d1b5279311c6e5034a2d1928d
DIFF: https://github.com/llvm/llvm-project/commit/20b2af3e5559e50d1b5279311c6e5034a2d1928d.diff
LOG: [clangd][NFC] Add traces for PreamblePatch::create
Added:
Modified:
clang-tools-extra/clangd/Preamble.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/Preamble.cpp b/clang-tools-extra/clangd/Preamble.cpp
index 667fa04ff345..d02685f4bf46 100644
--- a/clang-tools-extra/clangd/Preamble.cpp
+++ b/clang-tools-extra/clangd/Preamble.cpp
@@ -385,6 +385,8 @@ void escapeBackslashAndQuotes(llvm::StringRef Text, llvm::raw_ostream &OS) {
PreamblePatch PreamblePatch::create(llvm::StringRef FileName,
const ParseInputs &Modified,
const PreambleData &Baseline) {
+ trace::Span Tracer("CreatePreamblePatch");
+ SPAN_ATTACH(Tracer, "File", FileName);
assert(llvm::sys::path::is_absolute(FileName) && "relative FileName!");
// First scan preprocessor directives in Baseline and Modified. These will be
// used to figure out newly added directives in Modified. Scanning can fail,
More information about the cfe-commits
mailing list