================ @@ -327,6 +327,26 @@ class LLVMContext { [[deprecated("Always returns false")]] bool supportsTypedPointers() const; + /// Get the current "default" target CPU (target-cpu function attribute). The + /// intent is that compiler frontends will set this to a value that reflects + /// the attribute that a function would get "by default" without any specific + /// function attributes, and compiler passes will attach the attribute to + /// newly created functions that are not associated with a particular + /// function, such as global initializers. Function::createWithDefaultAttr() + /// will create functions with this attribute. This function should only be + /// called by passes that run at compile time and not by the backend or LTO + /// passes. + StringRef getDefaultTargetCPU(); + + /// See getDefaultTargetCPU(). + void setDefaultTargetCPU(StringRef CPU); + + /// Similar to getDefaultTargetCPU() but for default target-features instead. + StringRef getDefaultTargetFeatures(); + + /// See getDefaultTargetFeatures(). + void setDefaultTargetFeatures(StringRef Features); + ---------------- pcc wrote:
Done https://github.com/llvm/llvm-project/pull/96721 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits