MCPcopy Create free account
hub / github.com/csyonghe/Spire / FindVariableID

Method FindVariableID

Source/SpireCore/SpirVCodeGen.cpp:1899–1909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1897 }
1898
1899 int FindVariableID(ILOperand* op)
1900 {
1901 auto it = StackVariableNameToStorageID.end();
1902 while (it != StackVariableNameToStorageID.begin())
1903 {
1904 it--;
1905 if (it->ContainsKey(op))
1906 return (*it)[op];
1907 }
1908 return -1;
1909 }
1910
1911 // ***NOTICE***:
1912 // There is no relation between VariableNameToStorageID and ValueIDToVariableNames.

Callers 2

GetOperandPointerMethod · 0.80
PrintBinaryInstrMethod · 0.80

Calls 3

endMethod · 0.45
beginMethod · 0.45
ContainsKeyMethod · 0.45

Tested by

no test coverage detected