summaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-03-18 18:20:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-03-18 18:20:05 +0000
commit2fc9bb9ce23aec06620745773d24e59944b87ffc (patch)
tree0726fa11e6594591f34578ba035ea82a69fc0393 /clang/lib/Lex/Pragma.cpp
parentd652fd2996ce31dfd35dd2a9c58bf051ca7fff44 (diff)
Notes
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r--clang/lib/Lex/Pragma.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index a8cd18b123b09..57a95815488eb 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -42,6 +42,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/Timer.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
@@ -1038,6 +1039,8 @@ struct PragmaDebugHandler : public PragmaHandler {
if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
llvm_unreachable("This is an assertion!");
} else if (II->isStr("crash")) {
+ llvm::Timer T("crash", "pragma crash");
+ llvm::TimeRegion R(&T);
if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
LLVM_BUILTIN_TRAP;
} else if (II->isStr("parser_crash")) {