[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 11:20:57 PDT 2024


================
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features,
 Expected<std::unique_ptr<TargetMachine>>
 codegen::createTargetMachineForTriple(StringRef TargetTriple,
                                       CodeGenOptLevel OptLevel) {
-  Triple TheTriple(TargetTriple);
+  Triple TheTriple(TargetTriple.str());
----------------
bogner wrote:

This looks redundant - doesn't Triple's constructor do the conversion to `std::string` from Twine internally?

https://github.com/llvm/llvm-project/pull/90809


More information about the cfe-commits mailing list