From 2fc9bb9ce23aec06620745773d24e59944b87ffc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 18 Mar 2020 18:20:05 +0000 Subject: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-rc4-5-g52c365aa9ca. --- clang/lib/Lex/Pragma.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Lex/Pragma.cpp') 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 #include #include @@ -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")) { -- cgit v1.2.3