[clang] [llvm] Triple: Forward declare Twine and remove include (PR #145685)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 11:26:24 PDT 2025
================
@@ -349,7 +350,12 @@ class Triple {
/// triple fields unknown.
Triple() = default;
+ LLVM_ABI explicit Triple(std::string &&Str);
+ LLVM_ABI explicit Triple(StringRef Str) : Triple(Str.str()) {}
LLVM_ABI explicit Triple(const Twine &Str);
+ LLVM_ABI explicit Triple(const char *Str) : Triple(std::string(Str)) {}
+ LLVM_ABI explicit Triple(const std::string &Str) : Triple(std::string(Str)) {}
----------------
compnerd wrote:
I'm not sure if we should mark the inline ctors as ABI - do we want to emit a canonical version of them? It seems like those should all get folded alway through inlining into the out of line `Triple(std::string &&)` call.
https://github.com/llvm/llvm-project/pull/145685
More information about the cfe-commits
mailing list