[llvm-commits] [126481] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070423/048355.html
dpatel at apple.com
dpatel at apple.com
Tue Apr 24 12:27:29 PDT 2007
Revision: 126481
Author: dpatel
Date: 2007-04-24 12:27:29 -0700 (Tue, 24 Apr 2007)
Log Message:
-----------
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048355.html
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-convert.cpp
Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-24 16:16:23 UTC (rev 126480)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-24 19:27:29 UTC (rev 126481)
@@ -2973,6 +2973,11 @@
Value *TreeToLLVM::EmitBIT_NOT_EXPR(tree exp) {
Value *Op = Emit(TREE_OPERAND(exp, 0), 0);
+ if (isa<PointerType>(Op->getType())) {
+ assert (TREE_CODE(TREE_TYPE(exp)) == INTEGER_TYPE &&
+ "Expected integer type here");
+ Op = CastToType(Instruction::PtrToInt, Op, TREE_TYPE(exp));
+ }
return BinaryOperator::createNot(Op, Op->getName()+"not", CurBB);
}
More information about the llvm-commits
mailing list