[PATCH] D115353: Verifier: accept enums as scopes

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 10:58:43 PST 2021


ychen added inline comments.


================
Comment at: llvm/lib/IR/Verifier.cpp:888
-  // TODO: check that the non-ODR-type scope operand is valid.
-  verifyODRTypeAsScopeOperand<DIType>(MD);
-  verifyODRTypeAsScopeOperand<DILocalScope>(MD);
----------------
This should work.
```
  if (dwarf::isCPlusPlus(CurrentSourceLang)) {
    verifyODRTypeAsScopeOperand<DIType>(MD);
    verifyODRTypeAsScopeOperand<DILocalScope>(MD);
  }
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115353/new/

https://reviews.llvm.org/D115353



More information about the llvm-commits mailing list