================
@@ -562,6 +562,9 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags,
LangOptions &Opts,
}
}
+ if (Opts.Int64LongLong)
+ Int64Type = SignedLongLong;
----------------
nathanchance wrote:
Would something like this be sufficient? It seems like if this is unsupported,
it would be better to report the error to the user, rather than having an
internal assertion but maybe checking this all the time is too expensive?
```diff
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 270f73e8235a..31e69725e10f 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -562,8 +562,12 @@ void TargetInfo::adjust(DiagnosticsEngine &Diags,
LangOptions &Opts,
}
}
- if (Opts.Int64LongLong)
- Int64Type = SignedLongLong;
+ if (Opts.Int64LongLong) {
+ if (getLongLongWidth() > 64)
+ Diags.Report(diag::err_opt_not_valid_on_target) <<
"-fint64-is-long-long";
+ else
+ Int64Type = SignedLongLong;
+ }
if (Opts.NewAlignOverride)
NewAlign = Opts.NewAlignOverride * getCharWidth();
```
https://github.com/llvm/llvm-project/pull/234780
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits