diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-02 22:10:37 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-02 22:10:37 -0800 |
commit | b6a01caa64aaac2e5db8d7953a81cbe1a139b81f (patch) | |
tree | 1e03e63b8c985d3b1ca515ac811a87e31e6afef0 /llvm/unittests/Transforms/Utils/CloningTest.cpp | |
parent | b25362816d731ca2283b3b21ca7343a64c05d85c (diff) | |
download | llvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.zip llvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.tar.gz llvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.tar.bz2 |
[llvm/unittests] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/unittests/Transforms/Utils/CloningTest.cpp')
-rw-r--r-- | llvm/unittests/Transforms/Utils/CloningTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Transforms/Utils/CloningTest.cpp b/llvm/unittests/Transforms/Utils/CloningTest.cpp index 9b4a6fb..d5cd285 100644 --- a/llvm/unittests/Transforms/Utils/CloningTest.cpp +++ b/llvm/unittests/Transforms/Utils/CloningTest.cpp @@ -473,7 +473,7 @@ protected: // Function DI auto *File = DBuilder.createFile("filename.c", "/file/dir/"); - DITypeRefArray ParamTypes = DBuilder.getOrCreateTypeArray(None); + DITypeRefArray ParamTypes = DBuilder.getOrCreateTypeArray(std::nullopt); DISubroutineType *FuncType = DBuilder.createSubroutineType(ParamTypes); auto *CU = DBuilder.createCompileUnit(dwarf::DW_LANG_C99, @@ -962,7 +962,7 @@ protected: // Create debug info auto *File = DBuilder.createFile("filename.c", "/file/dir/"); - DITypeRefArray ParamTypes = DBuilder.getOrCreateTypeArray(None); + DITypeRefArray ParamTypes = DBuilder.getOrCreateTypeArray(std::nullopt); DISubroutineType *DFuncType = DBuilder.createSubroutineType(ParamTypes); auto *CU = DBuilder.createCompileUnit(dwarf::DW_LANG_C99, DBuilder.createFile("filename.c", |