diff options
| author | Karl Schimpf <kschimpf@google.com> | 2013-07-22 13:36:16 -0700 |
|---|---|---|
| committer | Karl Schimpf <kschimpf@google.com> | 2013-07-22 13:36:16 -0700 |
| commit | 0b41f88a8de25db50e1a57645a6e132954a6dcd2 (patch) | |
| tree | 059d73d19b2f788ce145d90015dd53b091095f28 /lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | |
| parent | 208b40ed21d78767d9d1c3c855cbd2e3a3c02451 (diff) | |
Enable ability to have multiple PNaCl wire format versions.
Modifies PNaCl bitcode reader/writer to accept PNaClVersion=1 as supported,
and all other versions are unsupported and unreadable. The PNaCl bitcode
reader/writer will generate appropriate messages (including what version
is unsupported if applicable).
Also allows command-line option --pnacl-version for setting the PNaClVersion
in the PNaCl bitcode writer.
Also fixes some problems on PNaCl bitcode headers, using common support to
determine when the read/written PNaCl bitcode file is valid.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/19400002
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp')
| -rw-r--r-- | lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp index 5e2484a3f3..01b4ff8df5 100644 --- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp +++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp @@ -32,7 +32,8 @@ static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { } /// NaClValueEnumerator - Enumerate module-level information. -NaClValueEnumerator::NaClValueEnumerator(const Module *M) { +NaClValueEnumerator::NaClValueEnumerator(const Module *M, uint32_t PNaClVersion) + : PNaClVersion(PNaClVersion) { // Create map for counting frequency of types, and set field // TypeCountMap accordingly. Note: Pointer field TypeCountMap is // used to deal with the fact that types are added through various |
