summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5bdab0f9ad39d2872dea3e9640d13ca00f6cc3b8 (patch)
tree68142e1531cc26f598063a90ab2790b06d0a0330 /llvm/lib/Bytecode/Reader/ReaderInternals.h
parent2091efbc0a3ebe2cb8e967ef8a1defe4685fa8f2 (diff)
downloadbcm5719-llvm-5bdab0f9ad39d2872dea3e9640d13ca00f6cc3b8.tar.gz
bcm5719-llvm-5bdab0f9ad39d2872dea3e9640d13ca00f6cc3b8.zip
* 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. llvm-svn: 323
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ReaderInternals.h')
-rw-r--r--llvm/lib/Bytecode/Reader/ReaderInternals.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h
index c73b6c06e7e..5721c7324d9 100644
--- a/llvm/lib/Bytecode/Reader/ReaderInternals.h
+++ b/llvm/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
OpenPOWER on IntegriCloud