[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)
Lucas Duarte Prates via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 07:57:30 PDT 2024
================
@@ -161,6 +162,39 @@ static int PrintSupportedExtensions(std::string TargetStr) {
return 0;
}
+static int PrintEnabledExtensions(const TargetOptions& TargetOpts) {
+ std::string Error;
+ const llvm::Target *TheTarget =
+ llvm::TargetRegistry::lookupTarget(TargetOpts.Triple, Error);
+ if (!TheTarget) {
+ llvm::errs() << Error;
+ return 1;
+ }
+
+ llvm::TargetOptions BackendOptions;
----------------
pratlucas wrote:
`TargetOpts` captures the frontend options as a `clang::TargetOptions` instance. The target machine takes an instance of `llvm::TargetOptions` instead. It's confusing that the same class name was chosen for both.
https://github.com/llvm/llvm-project/pull/95805
More information about the cfe-commits
mailing list