Lines Matching refs:DebugIR
1 //===- DebugIR.cpp - Unit tests for the DebugIR pass ----------------------===//
10 // The tests in this file verify the DebugIR pass that generates debug metadata
16 #include "../lib/Transforms/Instrumentation/DebugIR.h"
95 std::unique_ptr<DebugIR> D;
106 // constructing DebugIR with no args should not result in any file generated.
107 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
110 // verify DebugIR did not generate a file
118 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(true, true)));
123 // verify DebugIR generated a file, and clean it up
127 // Test not specifying a name in the module -- DebugIR should generate a name
131 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(false, false)));
136 // verify DebugIR generated a file and clean it up
149 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(true, true)));
154 // verify DebugIR was able to correctly parse the file name from module ID
157 // verify DebugIR generated a file, and clean it up
162 // at DebugIR construction.
167 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(
175 // verify DebugIR generated a file, and clean it up
180 // during DebugIR construction.
187 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(
195 // verify DebugIR generated a file, and clean it up
198 // verify DebugIR did not generate a file at the path specified at Module
211 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
217 // verify DebugIR did not generate a file
229 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass(true, true)));
235 // verify DebugIR generated a file, and clean it up
239 // Test a non-empty unnamed module is output to a path specified at DebugIR
247 D.reset(static_cast<DebugIR *>(
255 // verify DebugIR generated a file, and clean it up
273 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
279 // verify DebugIR did not generate a file
300 D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
302 // No name in module or on DebugIR construction ==> DebugIR should assert
304 "DebugIR unable to determine file name in input.");