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

S. Bharadwaj Yadavalli via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 13:11:04 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());
----------------
bharadwajy wrote:

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

Thanks for flagging my incomplete restoration. Fixed.

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


More information about the cfe-commits mailing list