Skip to content

Commit 49389f5

Browse files
committed
address pr feedback
1 parent 3217f06 commit 49389f5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clang/test/CodeGenDirectX/unsupported_intrinsic.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %if clang-dxc %{not %clang_dxc -T lib_6_3 %s 2>&1 | FileCheck %s %}
1+
// REQUIRES: directx-registered-target
2+
// RUN: not %clang_dxc -T lib_6_3 %s 2>&1 | FileCheck %s
23

34
// CHECK: error: Unsupported intrinsic llvm.vector.reduce.and.v4i32 for DXIL lowering
45

llvm/include/llvm/IR/DiagnosticInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class DiagnosticInfo {
139139
using DiagnosticHandlerFunction = std::function<void(const DiagnosticInfo &)>;
140140

141141
class DiagnosticInfoGeneric : public DiagnosticInfo {
142-
const Twine MsgStr;
142+
const Twine &MsgStr;
143143
const Instruction *Inst = nullptr;
144144

145145
public:

llvm/lib/Target/DirectX/DXILOpLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,8 @@ class OpLowerer {
756756
case Intrinsic::not_intrinsic:
757757
continue;
758758
default: {
759-
std::string Msg =
760-
formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName())
761-
.str();
759+
SmallString<128> Msg =
760+
formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName());
762761
M.getContext().emitError(Msg);
763762
HasErrors |= true;
764763
break;

0 commit comments

Comments
 (0)