|
@@ -1102,7 +1102,7 @@ void StmtPrinter::VisitIntegerLiteral(IntegerLiteral *Node) {
|
|
|
OS << Node->getValue().toString(10, isSigned);
|
|
|
|
|
|
// Emit suffixes. Integer literals are always a builtin integer type.
|
|
|
- switch (Node->getType()->getAs<BuiltinType>()->getKind()) {
|
|
|
+ switch (Node->getType()->castAs<BuiltinType>()->getKind()) {
|
|
|
default: llvm_unreachable("Unexpected type for integer literal!");
|
|
|
case BuiltinType::Char_S:
|
|
|
case BuiltinType::Char_U: OS << "i8"; break;
|
|
@@ -1123,7 +1123,7 @@ void StmtPrinter::VisitFixedPointLiteral(FixedPointLiteral *Node) {
|
|
|
return;
|
|
|
OS << Node->getValueAsString(/*Radix=*/10);
|
|
|
|
|
|
- switch (Node->getType()->getAs<BuiltinType>()->getKind()) {
|
|
|
+ switch (Node->getType()->castAs<BuiltinType>()->getKind()) {
|
|
|
default: llvm_unreachable("Unexpected type for fixed point literal!");
|
|
|
case BuiltinType::ShortFract: OS << "hr"; break;
|
|
|
case BuiltinType::ShortAccum: OS << "hk"; break;
|
|
@@ -1152,7 +1152,7 @@ static void PrintFloatingLiteral(raw_ostream &OS, FloatingLiteral *Node,
|
|
|
return;
|
|
|
|
|
|
// Emit suffixes. Float literals are always a builtin float type.
|
|
|
- switch (Node->getType()->getAs<BuiltinType>()->getKind()) {
|
|
|
+ switch (Node->getType()->castAs<BuiltinType>()->getKind()) {
|
|
|
default: llvm_unreachable("Unexpected type for float literal!");
|
|
|
case BuiltinType::Half: break; // FIXME: suffix?
|
|
|
case BuiltinType::Double: break; // no suffix.
|
|
@@ -1952,7 +1952,7 @@ void StmtPrinter::VisitLambdaExpr(LambdaExpr *Node) {
|
|
|
if (Node->isMutable())
|
|
|
OS << " mutable";
|
|
|
|
|
|
- auto *Proto = Method->getType()->getAs<FunctionProtoType>();
|
|
|
+ auto *Proto = Method->getType()->castAs<FunctionProtoType>();
|
|
|
Proto->printExceptionSpecification(OS, Policy);
|
|
|
|
|
|
// FIXME: Attributes
|