[PATCH] D47615: [DebugInfo] Adding DISubprogram::setFlags identical to DIType::setFlags

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 08:27:58 PDT 2018


aprantl added a comment.

We generally try to discourage modifying MDNodes after creation since this is an inherently dangerous thing to do since you never know who might be holding on to a pointer to an MDNode. Do you have really good reason to alter the flags on an existing node, or could you also just set the flags correctly at creation time? Even if the answer is yes I wonder if it wouldn't be better to clone a new distinct node with the modified flag.


Repository:
  rL LLVM

https://reviews.llvm.org/D47615





More information about the llvm-commits mailing list