Make Crubit resilient against adding new calling conventions to LLVM
aarch64_sve_pcs was just submitted into LLVM, and we need to make our code
forward compatible.
PiperOrigin-RevId: 448184582
diff --git a/rs_bindings_from_cc/importer.cc b/rs_bindings_from_cc/importer.cc
index 76c56c5..9713fae 100644
--- a/rs_bindings_from_cc/importer.cc
+++ b/rs_bindings_from_cc/importer.cc
@@ -165,8 +165,14 @@
case clang::CC_PreserveMost: // __attribute__((preserve_most))
case clang::CC_PreserveAll: // __attribute__((preserve_all))
case clang::CC_AArch64VectorCall: // __attribute__((aarch64_vector_pcs))
+ // TODO(hlopko): Uncomment once we integrate the upstream change that
+ // introduced it:
+ // case clang::CC_AArch64SVEPCS: __attribute__((aarch64_sve_pcs))
+
// These don't seem to have any Rust equivalents.
break;
+ default:
+ LOG(WARNING) << "Unexpected calling convention: " << cc_call_conv;
}
return absl::UnimplementedError(
absl::StrCat("Unsupported calling convention: ",