Displaying 1 result from an estimated 1 matches for "inheritlocationfrominst".
2018 Aug 07
3
[RFC] Add DebugLoc parameter in Instruction’s Create() functions
...the correct DL or “manually” create
the instruction via one of it’s Create() routines and then
call `setDebugLoc()` to it.
I propose the addition of a DebugLoc parameter
in the *::Create() instruction constructors.
This could be in the form of a pure DebugLoc
variable or possibly an `Instruction *InheritLocationFromInst` one
Some pros of this idea are:
- Easier to create instructions with debug location.
- It will make the code more readable by eliminating
the many `NewInst->setDebugLoc(OldInst->getDebugLoc)` calls.
- It will incentivize people to think about the DebugLoc of
their newly created instruc...