Fix a crasher where when we're attempting to replace a type
[oota-llvm.git] / lib / IR / Type.cpp
index 86f2d89dd338f892b23cc2db8867d5085118d051..b02509fcf35eb1bd95ae573473382b85beb1dbea 100644 (file)
@@ -132,7 +132,7 @@ unsigned Type::getPrimitiveSizeInBits() const {
 /// getScalarSizeInBits - If this is a vector type, return the
 /// getPrimitiveSizeInBits value for the element type. Otherwise return the
 /// getPrimitiveSizeInBits value for this type.
-unsigned Type::getScalarSizeInBits() {
+unsigned Type::getScalarSizeInBits() const {
   return getScalarType()->getPrimitiveSizeInBits();
 }