[llvm-commits] [llvm] r99349 - /llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Daniel Dunbar
daniel at zuster.org
Tue Mar 23 16:47:12 PDT 2010
Author: ddunbar
Date: Tue Mar 23 18:47:12 2010
New Revision: 99349
URL: http://llvm.org/viewvc/llvm-project?rev=99349&view=rev
Log:
llvm-mc: Support -filetype=null, for timing purposes.
Modified:
llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=99349&r1=99348&r2=99349&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Tue Mar 23 18:47:12 2010
@@ -56,6 +56,7 @@
cl::desc("Syntax variant to use for output printing"));
enum OutputFileType {
+ OFT_Null,
OFT_AssemblyFile,
OFT_ObjectFile
};
@@ -65,6 +66,8 @@
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 @@
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));
More information about the llvm-commits
mailing list