aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMNaClRewritePass.cpp
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2012-10-31 11:56:33 -0700
committerJan Voung <jvoung@chromium.org>2012-10-31 11:56:33 -0700
commit150cdf98b83bdae9912e0985bba91495315f2ad1 (patch)
treefd6a6f04504f40ccb7f47b5ff392a14c2856c7c5 /lib/Target/ARM/ARMNaClRewritePass.cpp
parent228957b28f4ebb833c7417aa1d773dc77721bb45 (diff)
llvm: build with fewer warnings
Warnings: unused variables, unused functions, -Wreorder, and remember to return a value in a non-void function. Also remove setjmp/longjmp intrinsics for x86, which aren't being used now (no equivalents in ARM and no equivalent for x86-64 with the zero-based sandbox, etc.). This exposes a few more unused functions. BUG= none TEST= test-all Review URL: https://codereview.chromium.org/11345016
Diffstat (limited to 'lib/Target/ARM/ARMNaClRewritePass.cpp')
-rw-r--r--lib/Target/ARM/ARMNaClRewritePass.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Target/ARM/ARMNaClRewritePass.cpp b/lib/Target/ARM/ARMNaClRewritePass.cpp
index bf3d4596d6..09bd54cdbd 100644
--- a/lib/Target/ARM/ARMNaClRewritePass.cpp
+++ b/lib/Target/ARM/ARMNaClRewritePass.cpp
@@ -13,7 +13,7 @@
// isolation (SFI) constructions to be put in place, to prevent escape from
// the sandbox. Native Client refuses to execute binaries without the correct
// SFI sequences.
-//
+//
// Potentially dangerous operations which are protected include:
// * Stores
// * Branches
@@ -154,12 +154,6 @@ static void DumpBasicBlockVerbose(const MachineBasicBlock &MBB) {
dbgs() << "<<<<< DUMP BASIC BLOCK END\n\n";
}
-static void DumpBasicBlockVerboseCond(const MachineBasicBlock &MBB, bool b) {
- if (b) {
- DumpBasicBlockVerbose(MBB);
- }
-}
-
/**********************************************************************/
/* Exported functions */
@@ -356,11 +350,10 @@ void ARMNaClRewritePass::SandboxStackChange(MachineBasicBlock &MBB,
BuildMI(MBB, MBBI, MI.getDebugLoc(),
TII->get(ARM::SFI_NOP_IF_AT_BUNDLE_END));
- // Get to next instr (one + to get the original, and one more + to get past)
- MachineBasicBlock::iterator MBBINext = (MBBI++);
- MachineBasicBlock::iterator MBBINext2 = (MBBI++);
+ // Get to next instr.
+ MachineBasicBlock::iterator MBBINext = (++MBBI);
- BuildMI(MBB, MBBINext2, MI.getDebugLoc(),
+ BuildMI(MBB, MBBINext, MI.getDebugLoc(),
TII->get(ARM::SFI_DATA_MASK))
.addReg(ARM::SP, RegState::Define) // modify SP (as dst)
.addReg(ARM::SP, RegState::Kill) // start with SP (as src)