diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-08-14 14:57:21 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-08-14 14:57:21 -0700 |
commit | 1d5f6749707a8821be66ad7bad1b48ad67257110 (patch) | |
tree | 1aed5bd3e31b35a51d48b6aad4e16b0118d51693 /lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp | |
parent | 1a563f0e433442f3f7aa60b636cc6a95d1c22c29 (diff) |
Remove ptrtoint instructions from the PNaCl bitcode file.
Removes ptrtoint instructions when applicable (currently only in stores), and add them back just before their use.
Note: This code does not handle ptrtoint casts for calls and phi nodes, binary operators, etc. because handling of casts for these instructions has not been added yet.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/22633002
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp index f6b85108e6..047e0c84db 100644 --- a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp +++ b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp @@ -413,7 +413,7 @@ void WriteGlobalInit(const Constant *C, unsigned GlobalVarID, } return; } - if (C->getType()->isIntegerTy(32)) { + if (VE.IsIntPtrType(C->getType())) { // This constant defines a relocation. Start by verifying the // relocation is of the right form. const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); |