[PATCH] D37877: Update getMergedLocation to check the instruction type and merge properly.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 09:14:49 PDT 2017


danielcdh added inline comments.


================
Comment at: include/llvm/IR/Instruction.h:391
+  ///     applications, thus the N-way merging should be in code path.
+  void applyMergedLocation(const DILocation *LocA, const DILocation *LocB);
+
----------------
aprantl wrote:
> Should we document what happens to the debug location already attached to `this`? Or - looking at the use-cases - should it assert that the debugloc is empty?
Not sure if I understand this. this->debugloc will be either empty, or locA or locB. But it will be overwritten anyway, why do we care about its value?


https://reviews.llvm.org/D37877





More information about the llvm-commits mailing list