diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-23 23:47:12 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-23 23:47:12 +0000 |
commit | 2d9f5d1d7f7aac13396778ba0d18cf1af8d0d02f (patch) | |
tree | 589af40215799f51ab122e762b128c35f4b82397 | |
parent | ef6e96f91fd812ba9ead6fdef3975abb1139c123 (diff) | |
download | external_llvm-2d9f5d1d7f7aac13396778ba0d18cf1af8d0d02f.zip external_llvm-2d9f5d1d7f7aac13396778ba0d18cf1af8d0d02f.tar.gz external_llvm-2d9f5d1d7f7aac13396778ba0d18cf1af8d0d02f.tar.bz2 |
llvm-mc: Support -filetype=null, for timing purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99349 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 3c23990..0e183b0 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -56,6 +56,7 @@ OutputAsmVariant("output-asm-variant", cl::desc("Syntax variant to use for output printing")); enum OutputFileType { + OFT_Null, OFT_AssemblyFile, OFT_ObjectFile }; @@ -65,6 +66,8 @@ FileType("filetype", cl::init(OFT_AssemblyFile), cl::values( clEnumValN(OFT_AssemblyFile, "asm", "Emit an assembly ('.s') file"), + clEnumValN(OFT_Null, "null", + "Don't emit anything (for timing purposes)"), clEnumValN(OFT_ObjectFile, "obj", "Emit a native object ('.o') file"), clEnumValEnd)); @@ -289,6 +292,8 @@ static int AssembleInput(const char *ProgName) { CE.reset(TheTarget->createCodeEmitter(*TM, Ctx)); Str.reset(createAsmStreamer(Ctx, *Out,TM->getTargetData()->isLittleEndian(), /*asmverbose*/true, IP, CE.get(), ShowInst)); + } else if (FileType == OFT_Null) { + Str.reset(createNullStreamer(Ctx)); } else { assert(FileType == OFT_ObjectFile && "Invalid file type!"); CE.reset(TheTarget->createCodeEmitter(*TM, Ctx)); |