summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-26 21:48:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-26 21:48:55 +0000
commitb33dfbcba4eb6bc18350f780d66a8d6bdc22dba6 (patch)
tree8046542f20cf0299f59770b73d0640827c1d694a /llvm/lib
parentde2291a7176d626d3a6eff89dd94efbfa85b2d35 (diff)
downloadbcm5719-llvm-b33dfbcba4eb6bc18350f780d66a8d6bdc22dba6.tar.gz
bcm5719-llvm-b33dfbcba4eb6bc18350f780d66a8d6bdc22dba6.zip
MC: Add TargetMachine support for setting the value of MCRelaxAll with
-filetype=obj. llvm-svn: 104747
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp6
-rw-r--r--llvm/lib/Target/TargetMachine.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 48c42406e17..b584704bff3 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -160,8 +160,10 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
TargetAsmBackend *TAB = getTarget().createAsmBackend(TargetTriple);
if (MCE == 0 || TAB == 0)
return true;
-
- AsmStreamer.reset(createMachOStreamer(*Context, *TAB, Out, MCE));
+
+ AsmStreamer.reset(getTarget().createObjectStreamer(TargetTriple, *Context,
+ *TAB, Out, MCE,
+ hasMCRelaxAll()));
break;
}
case CGFT_Null:
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index b947b786a4f..df523688c58 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -212,7 +212,8 @@ FunctionSections("ffunction-sections",
//
TargetMachine::TargetMachine(const Target &T)
- : TheTarget(T), AsmInfo(0) {
+ : TheTarget(T), AsmInfo(0),
+ MCRelaxAll(false) {
// Typically it will be subtargets that will adjust FloatABIType from Default
// to Soft or Hard.
if (UseSoftFloat)
OpenPOWER on IntegriCloud