I just tried to compile a fresh copy of LLVM (from svn) under Cygwin,
and I got the following compiler errors:
llvm[2]: Compiling TargetData.cpp for Debug build
llvm[3]: Compiling SPUISelLowering.cpp for Debug build
SPUISelLowering.cpp: In function `llvm::SDOperand
LowerLOAD(llvm::SDOperand, llvm::SelectionDAG&, const
llvm::SPUSubtarget*)':
SPUISelLowering.cpp:558: error: invalid initialization of reference of
type 'unsigned int&' from expression of type 'llvm::MVT::ValueType'
SPUISelLowering.cpp:457: error: in passing argument 8 of
`llvm::SDOperand AlignedLoad(llvm::SDOperand, llvm::SelectionDAG&,
const llvm::SPUSubtarget*, llvm::LSBaseSDNode*, unsigned int&, int&,
int&, unsigned int&, bool&)'
[ The message is repeated for line 673, for the same reason. ]
I was able to fix this by changing the type of AlignedLoad()'s eighth
argument to be llvm::MVT::ValueType. This seems to better fit the
intentions of the original author, but it bothers me that I don't
understand why the compiler was complaining about the original code.
A trivial patch is attached.
Thanks,
Sam Bishop
Index: SPUISelLowering.cpp
===================================================================
--- SPUISelLowering.cpp (revision 45908)
+++ SPUISelLowering.cpp (working copy)
@@ -453,7 +453,7 @@
AlignedLoad(SDOperand Op, SelectionDAG &DAG, const SPUSubtarget *ST,
LSBaseSDNode *LSN,
unsigned &alignment, int &alignOffs, int &prefSlotOffs,
- unsigned &VT, bool &was16aligned)
+ MVT::ValueType &VT, bool &was16aligned)
{
MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
const valtype_map_s *vtm = getValueTypeMapEntry(VT);
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits