[llvm-commits] [dragonegg] r141538 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Mon Oct 10 07:10:02 PDT 2011
Author: baldrick
Date: Mon Oct 10 09:10:02 2011
New Revision: 141538
URL: http://llvm.org/viewvc/llvm-project?rev=141538&view=rev
Log:
Don't declare Result as a new variable here, shadowing the real Result.
Remove a pointless array while there.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=141538&r1=141537&r2=141538&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Mon Oct 10 09:10:02 2011
@@ -4188,15 +4188,12 @@
EmitMemory(gimple_call_arg(stmt, 0)),
EmitMemory(gimple_call_arg(stmt, 1))
};
- Type* Ty[2];
- Ty[0] = ResultTy;
- Ty[1] = ResultTy->getPointerTo();
- C[0] = Builder.CreateBitCast(C[0], Ty[1]);
- C[1] = Builder.CreateIntCast(C[1], Ty[0],
+ C[0] = Builder.CreateBitCast(C[0], ResultTy->getPointerTo());
+ C[1] = Builder.CreateIntCast(C[1], ResultTy,
/*isSigned*/!TYPE_UNSIGNED(return_type),
"cast");
- Value *Result = Builder.CreateAtomicRMW(AtomicRMWInst::Nand, C[0], C[1],
- SequentiallyConsistent);
+ Result = Builder.CreateAtomicRMW(AtomicRMWInst::Nand, C[0], C[1],
+ SequentiallyConsistent);
Result = Builder.CreateAnd(Builder.CreateNot(Result), C[1]);
Result = Builder.CreateIntToPtr(Result, ResultTy);
More information about the llvm-commits
mailing list