diff --git a/llvm/unittests/Analysis/ReplaceWithVecLibTest.cpp b/llvm/unittests/Analysis/ReplaceWithVecLibTest.cpp index a1f0a4a894c8d..95f17f93bf4c0 100644 --- a/llvm/unittests/Analysis/ReplaceWithVecLibTest.cpp +++ b/llvm/unittests/Analysis/ReplaceWithVecLibTest.cpp @@ -72,9 +72,11 @@ class ReplaceWithVecLibTest : public ::testing::Test { PB.registerFunctionAnalyses(FAM); // Enable debugging and capture std error + bool DebugFlagPrev = llvm::DebugFlag; llvm::DebugFlag = true; testing::internal::CaptureStderr(); FPM.run(*M->getFunction("foo"), FAM); + llvm::DebugFlag = DebugFlagPrev; return getLastLine(testing::internal::GetCapturedStderr()); } };