Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2446)

Unified Diff: pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDefs.h

Issue 1960393002: Subzero: Add necessary PNaCl files for standalone build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: make format Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDefs.h
diff --git a/pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDefs.h b/pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDefs.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb1792ff0c188583607844b6f24f0ccc84cb72c4
--- /dev/null
+++ b/pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDefs.h
@@ -0,0 +1,53 @@
+//===- NaClBitcodeDefs.h ----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Defines some common types/constants used by bitcode readers and
+// writers. It is intended to make clear assumptions made in
+// representing bitcode files.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_BITCODE_NACL_NACLBITCODEDEFS_H
+#define LLVM_BITCODE_NACL_NACLBITCODEDEFS_H
+
+namespace llvm {
+
+namespace naclbitc {
+
+// Special record codes used to model codes for predefined records.
+// They are very large so that they do not conflict with existing
+// record codes for user-defined blocks.
+enum SpecialBlockCodes {
+ BLK_CODE_ENTER = 65535,
+ BLK_CODE_EXIT = 65534,
+ BLK_CODE_DEFINE_ABBREV = 65533,
+ BLK_CODE_HEADER = 65532
+};
+
+} // end of namespace naclbitc
+
+/// Defines type for value indicies in bitcode. Like a size_t, but
+/// fixed across platforms.
+typedef uint32_t NaClBcIndexSize_t;
+
+/// Signed version of NaClBcIndexSize_t. Used to define relative indices.
+typedef int32_t NaClRelBcIndexSize_t;
+
+/// Defines maximum allowed bitcode index in bitcode files.
+static const size_t NaClBcIndexSize_t_Max =
+ std::numeric_limits<NaClBcIndexSize_t>::max();
+
+/// Defines the maximum number of initializers allowed, based on ILP32.
+static const size_t MaxNaClGlobalVarInits =
+ std::numeric_limits<uint32_t>::max();
+
+} // end of namespace llvm
+
+
+#endif // LLVM_BITCODE_NACL_NACLBITCODEDEFS_H
« no previous file with comments | « pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeDecoders.h ('k') | pnacl-llvm/include/llvm/Bitcode/NaCl/NaClBitcodeHeader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698