[llvm-commits] [dragonegg] r167288 - /dragonegg/trunk/src/ConstantConversion.cpp
Duncan Sands
baldrick at free.fr
Fri Nov 2 02:00:50 PDT 2012
Author: baldrick
Date: Fri Nov 2 04:00:49 2012
New Revision: 167288
URL: http://llvm.org/viewvc/llvm-project?rev=167288&view=rev
Log:
Tidy using new convenience method.
Modified:
dragonegg/trunk/src/ConstantConversion.cpp
Modified: dragonegg/trunk/src/ConstantConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/ConstantConversion.cpp?rev=167288&r1=167287&r2=167288&view=diff
==============================================================================
--- dragonegg/trunk/src/ConstantConversion.cpp (original)
+++ dragonegg/trunk/src/ConstantConversion.cpp Fri Nov 2 04:00:49 2012
@@ -1337,7 +1337,7 @@
static Constant *ConvertMINUS_EXPR(tree exp, TargetFolder &Folder) {
Constant *LHS = getAsRegister(TREE_OPERAND(exp, 0), Folder);
Constant *RHS = getAsRegister(TREE_OPERAND(exp, 1), Folder);
- if (LHS->getType()->getScalarType()->isPointerTy()) {
+ if (LHS->getType()->isPtrOrPtrVectorTy()) {
Type *PtrIntTy = getDataLayout().getIntPtrType(LHS->getType());
LHS = Folder.CreatePtrToInt(LHS, PtrIntTy);
RHS = Folder.CreatePtrToInt(RHS, PtrIntTy);
More information about the llvm-commits
mailing list