aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/ReaderInternals.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-28 17:50:18 +0000
committerChris Lattner <sabre@nondot.org>2001-07-28 17:50:18 +0000
commit3d3f289eac5e85f65e55ca2798d0f0f1b7218163 (patch)
tree5d4830712de96f2d15734853bc8a3ee1e767397f /lib/Bytecode/Reader/ReaderInternals.h
parent81e29632f70bcd789af6d27b4622ea3cba162aba (diff)
* Add calls to failure template so that it is actually possible to debug
why bytecode parsing is failing. Just put a breakpoint in the failure templates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ReaderInternals.h')
-rw-r--r--lib/Bytecode/Reader/ReaderInternals.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h
index c73b6c06e7..5721c7324d 100644
--- a/lib/Bytecode/Reader/ReaderInternals.h
+++ b/lib/Bytecode/Reader/ReaderInternals.h
@@ -136,4 +136,13 @@ static inline bool readBlock(const uchar *&Buf, const uchar *EndBuf,
#endif
}
+
+// failure Template - This template function is used as a place to put
+// breakpoints in to debug failures of the bytecode parser.
+//
+template <typename X>
+static X failure(X Value) {
+ return Value;
+}
+
#endif