diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-29 22:03:56 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-29 22:03:56 +0000 |
commit | e75d9cfbf41a0ee9e456a665776f91fdd9773b36 (patch) | |
tree | 13125e0fea4a9ade1f56af7507b1dd2cd550a79c /lib/Lex/Pragma.cpp | |
parent | 4ac5751efb9de1065c71b0db587185d552803e2f (diff) |
Use -frewrite-includes for crash reports.
In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
preferring a location that is properly cleaned up by lit.
Review by Chandler Carruth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 7b94d268b5..c9cc4adf40 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -1010,6 +1010,10 @@ struct PragmaDebugHandler : public PragmaHandler { llvm_unreachable("This is an assertion!"); } else if (II->isStr("crash")) { *(volatile int*) 0x11 = 0; + } else if (II->isStr("parser_crash")) { + Token Crasher; + Crasher.setKind(tok::annot_pragma_parser_crash); + PP.EnterToken(Crasher); } else if (II->isStr("llvm_fatal_error")) { llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error"); } else if (II->isStr("llvm_unreachable")) { |