From 356d6b636b778fb256f8ae404021a1c70a6e6e53 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Tue, 6 Sep 2016 03:14:06 +0000 Subject: DebugInfo: use strongly typed enum for debug info flags Use ADT/BitmaskEnum for DINode::DIFlags for the following purposes: * Get rid of unsigned int for flags to avoid problems on platforms with sizeof(int) < 4 * Flags are now strongly typed Patch by: Victor Leschuk Differential Revision: https://reviews.llvm.org/D23766 llvm-svn: 280686 --- llvm/unittests/Transforms/Utils/Cloning.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'llvm/unittests/Transforms/Utils') diff --git a/llvm/unittests/Transforms/Utils/Cloning.cpp b/llvm/unittests/Transforms/Utils/Cloning.cpp index f53e0a95e94..6b4b7442115 100644 --- a/llvm/unittests/Transforms/Utils/Cloning.cpp +++ b/llvm/unittests/Transforms/Utils/Cloning.cpp @@ -235,8 +235,9 @@ protected: DBuilder.createCompileUnit(dwarf::DW_LANG_C99, "filename.c", "/file/dir", "CloneFunc", false, "", 0); - auto *Subprogram = DBuilder.createFunction( - CU, "f", "f", File, 4, FuncType, true, true, 3, 0, false); + auto *Subprogram = + DBuilder.createFunction(CU, "f", "f", File, 4, FuncType, true, true, 3, + DINode::FlagZero, false); OldFunc->setSubprogram(Subprogram); // Function body @@ -421,8 +422,9 @@ protected: DBuilder.createCompileUnit(dwarf::DW_LANG_C99, "filename.c", "/file/dir", "CloneModule", false, "", 0); // Function DI - auto *Subprogram = DBuilder.createFunction(CU, "f", "f", File, 4, DFuncType, - true, true, 3, 0, false); + auto *Subprogram = + DBuilder.createFunction(CU, "f", "f", File, 4, DFuncType, true, true, 3, + DINode::FlagZero, false); F->setSubprogram(Subprogram); auto *Entry = BasicBlock::Create(C, "", F); -- cgit v1.2.3