[llvm] [DirectX] Update for API change in #139406 (PR #139470)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 11 13:29:04 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-directx
Author: Justin Bogner (bogner)
<details>
<summary>Changes</summary>
getAsmString returns StringRef now. Fixes build for the DirectX backend.
---
Full diff: https://github.com/llvm/llvm-project/pull/139470.diff
1 Files Affected:
- (modified) llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
index 5ce3c7b35493b..1d79c3018439e 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
@@ -1974,7 +1974,7 @@ void DXILBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
unsigned(IA->getDialect() & 1) << 2);
// Add the asm string.
- const std::string &AsmStr = IA->getAsmString();
+ StringRef AsmStr = IA->getAsmString();
Record.push_back(AsmStr.size());
Record.append(AsmStr.begin(), AsmStr.end());
``````````
</details>
https://github.com/llvm/llvm-project/pull/139470
More information about the llvm-commits
mailing list