Author: dlj Date: Thu Feb 18 14:27:16 2016 New Revision: 261252 URL: http://llvm.org/viewvc/llvm-project?rev=261252&view=rev Log: Use Backend_EmitMCNull for null codegen unit tests.
Using Backend_EmitLL attemps to create a file with an empty filename. This is problematic in certain environments: an empty filename may be illegal, or the default output path may not be writable (in the case where an empty filename would otherwise have some non-failing semantics). This patch switches to use Backend_EmitMCNull, which allows CodeGen to run, but does not attempt to create or write an output file. Differential Revision: http://reviews.llvm.org/D17405 Modified: cfe/trunk/unittests/Frontend/CodeGenActionTest.cpp Modified: cfe/trunk/unittests/Frontend/CodeGenActionTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/CodeGenActionTest.cpp?rev=261252&r1=261251&r2=261252&view=diff ============================================================================== --- cfe/trunk/unittests/Frontend/CodeGenActionTest.cpp (original) +++ cfe/trunk/unittests/Frontend/CodeGenActionTest.cpp Thu Feb 18 14:27:16 2016 @@ -26,7 +26,7 @@ namespace { class NullCodeGenAction : public CodeGenAction { public: NullCodeGenAction(llvm::LLVMContext *_VMContext = nullptr) - : CodeGenAction(Backend_EmitLL, _VMContext) {} + : CodeGenAction(Backend_EmitMCNull, _VMContext) {} // The action does not call methods of ATContext. void ExecuteAction() override { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits