Skip to content

Commit

Permalink
clang-format!
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffnn committed Dec 5, 2023
1 parent e5ed95a commit 32b8eab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
9 changes: 4 additions & 5 deletions tools/clang/unittests/HLSL/PixDiaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,8 @@ TEST_F(PixDiaTest, DxcPixDxilDebugInfo_VariableScopes_ForScopes) {
DWORD instructionOffset =
AdvanceUntilFunctionEntered(dxilDebugger, 0, L"CSMain");

instructionOffset = Labels->FindInstructionOffsetForLabel(L"CheckVariableExistsHere");
instructionOffset =
Labels->FindInstructionOffsetForLabel(L"CheckVariableExistsHere");
CheckVariableExistsAtThisInstruction(dxilDebugger, instructionOffset,
L"zero");

Expand Down Expand Up @@ -3195,14 +3196,12 @@ void CSMain()
Labels->FindInstructionOffsetForLabel(L"inside member fn");
CheckVariableDoesNOTExistsAtThisInstruction(dxilDebugger, instructionOffset,
L"s");
CheckVariableExistsAtThisInstruction(dxilDebugger, instructionOffset,
L"q");
CheckVariableExistsAtThisInstruction(dxilDebugger, instructionOffset, L"q");

instructionOffset = Labels->FindInstructionOffsetForLabel(L"Stop here");
CheckVariableDoesNOTExistsAtThisInstruction(dxilDebugger, instructionOffset,
L"i");
CheckVariableExistsAtThisInstruction(dxilDebugger, instructionOffset,
L"j");
CheckVariableExistsAtThisInstruction(dxilDebugger, instructionOffset, L"j");
}

#endif
9 changes: 4 additions & 5 deletions tools/clang/unittests/HLSL/PixTestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class InstructionOffsetSeekerImpl : public InstructionOffsetSeeker {

std::map<std::wstring, DWORD> m_labelToInstructionOffset;

public:
public:
InstructionOffsetSeekerImpl(DebuggerInterfaces &debuggerInterfaces) {
DWORD SourceFileOrdinal = 0;
CComBSTR fileName;
Expand All @@ -291,8 +291,7 @@ class InstructionOffsetSeekerImpl : public InstructionOffsetSeeker {
auto DebugLocPos = lines[line].find(DebugLocLabel);
if (DebugLocPos != std::wstring::npos) {
auto StartLabelPos = DebugLocPos + (_countof(DebugLocLabel) - 1);
auto CloseDebugLocPos =
lines[line].find(L")", StartLabelPos);
auto CloseDebugLocPos = lines[line].find(L")", StartLabelPos);
VERIFY_ARE_NOT_EQUAL(CloseDebugLocPos, std::string::npos);
auto Label = lines[line].substr(StartLabelPos,
CloseDebugLocPos - StartLabelPos);
Expand All @@ -307,7 +306,7 @@ class InstructionOffsetSeekerImpl : public InstructionOffsetSeeker {
m_labelToInstructionOffset.end());
// Just the last offset is sufficient:
m_labelToInstructionOffset[Label] =
InstructionOffsets->GetOffsetByIndex(InstructionOffsetCount-1);
InstructionOffsets->GetOffsetByIndex(InstructionOffsetCount - 1);
}
}
SourceFileOrdinal++;
Expand All @@ -316,7 +315,7 @@ class InstructionOffsetSeekerImpl : public InstructionOffsetSeeker {
}
}

virtual DWORD FindInstructionOffsetForLabel(const wchar_t* label) override {
virtual DWORD FindInstructionOffsetForLabel(const wchar_t *label) override {
return m_labelToInstructionOffset[label];
}
};
Expand Down
2 changes: 1 addition & 1 deletion tools/clang/unittests/HLSL/PixTestUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "dxc/Support/WinIncludes.h"
#include "dxc/dxcpix.h"

#include <memory>
#include <string>
#include <vector>
#include <memory>

namespace dxc {
class DxcDllSupport;
Expand Down

0 comments on commit 32b8eab

Please sign in to comment.