mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 04:56:06 +00:00
Fix -emit-codegen-only to not generate binaries
llvm-svn: 210059
This commit is contained in:
parent
0e64e0d4fd
commit
cf2048bbb3
@ -568,6 +568,7 @@ static raw_ostream *GetOutputStream(CompilerInstance &CI,
|
||||
case Backend_EmitNothing:
|
||||
return nullptr;
|
||||
case Backend_EmitMCNull:
|
||||
return new raw_null_ostream();
|
||||
case Backend_EmitObj:
|
||||
return CI.createDefaultOutputFile(true, InFile, "o");
|
||||
}
|
||||
|
7
clang/test/Frontend/disable-output.c
Normal file
7
clang/test/Frontend/disable-output.c
Normal file
@ -0,0 +1,7 @@
|
||||
// REQUIRES: x86-registered-target
|
||||
// RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-apple-darwin -o %t
|
||||
// RUN: not rm %t
|
||||
// RUN: %clang_cc1 %s -emit-codegen-only -triple=i386-apple-darwin -o %t
|
||||
// RUN: not rm %t
|
||||
|
||||
// Test that output is not generated when emission is disabled.
|
Loading…
x
Reference in New Issue
Block a user