aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2010-05-21 12:54:43 +0000
committerMatt Fleming <matt@console-pimps.org>2010-05-21 12:54:43 +0000
commitd8a33ddcfeb29e7ec792b14be946a05ab998a38e (patch)
tree3df382a47fe6a3348c51b628926dfbb6d5c72b69 /tools/llvm-mc
parent7efaef6b822089349b44f15392e0da73a05ebb0a (diff)
downloadexternal_llvm-d8a33ddcfeb29e7ec792b14be946a05ab998a38e.zip
external_llvm-d8a33ddcfeb29e7ec792b14be946a05ab998a38e.tar.gz
external_llvm-d8a33ddcfeb29e7ec792b14be946a05ab998a38e.tar.bz2
Currently, createMachOStreamer() is invoked directly in llvm-mc which
isn't ideal if we want to be able to use another object file format. Add a createObjectStreamer() factory method so that the correct object file streamer can be instantiated for a given target triple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 18ab98e..ca098e1 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -301,7 +301,8 @@ static int AssembleInput(const char *ProgName) {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
CE.reset(TheTarget->createCodeEmitter(*TM, Ctx));
TAB.reset(TheTarget->createAsmBackend(TripleName));
- Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get(), RelaxAll));
+ Str.reset(TheTarget->createObjectStreamer(TripleName, Ctx, *TAB,
+ *Out, CE.get(), RelaxAll));
}
AsmParser Parser(SrcMgr, Ctx, *Str.get(), *MAI);