Add correct line number to OpDebugFunction and OpDebugScope for function:

1. Pull OpDebugFunction, OpDebugScope and OpDebugVariable for params out
   of makeFunctionEntry.
2. Put above in a separate function called setupDebugFunctionEntry,
   which also accept line number and set it correctly in builder.
3. Call setupDebugFunctionEntry in makeFunction. Also special case
   handle entry function since it's created ealier elsewhere.
This commit is contained in:
Chao Chen 2023-10-12 05:42:55 +01:00
parent a2fb1ba2ad
commit 979423d84f
19 changed files with 9076 additions and 9016 deletions

View file

@ -237,6 +237,9 @@ public:
Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId);
Id makeDebugLexicalBlock(uint32_t line);
std::string unmangleFunctionName(std::string const& name) const;
void setupDebugFunctionEntry(Function* function, const char* name, int line,
const std::vector<Id>& paramTypes,
const std::vector<char const*>& paramNames);
// accelerationStructureNV type
Id makeAccelerationStructureType();