diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp index c30a698822b..c2d5a1403e4 100644 --- a/lib/ExecutionEngine/JIT/TargetSelect.cpp +++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp @@ -76,8 +76,7 @@ TargetMachine *JIT::selectTarget(ModuleProvider *MP, std::string *ErrorStr) { // Allocate a target... TargetMachine *Target = - TheTarget->createTargetMachine(*MP->getModule(), TheTriple.getTriple(), - FeaturesStr); + TheTarget->createTargetMachine(TheTriple.getTriple(), FeaturesStr); assert(Target && "Could not allocate target machine!"); return Target; } diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 2892826a85d..f7923200a97 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -3190,8 +3190,7 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) { if (Match) { // Per platform Target Machines don't exist, so create it; // this must be done only once. - const TargetMachine* TM = Match->createTargetMachine(*TheModule, Triple, - ""); + const TargetMachine* TM = Match->createTargetMachine(Triple, ""); TAsm = TM->getTargetAsmInfo(); } } diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index f5815708223..cbc1d7b1add 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -285,8 +285,7 @@ int main(int argc, char **argv) { } std::auto_ptr - target(TheTarget->createTargetMachine(mod, TheTriple.getTriple(), - FeaturesStr)); + target(TheTarget->createTargetMachine(TheTriple.getTriple(), FeaturesStr)); assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index d440b04fa67..598da7fa664 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -322,7 +322,6 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) Triple = sys::getHostTriple(); // create target machine from info for merged modules - Module* mergedModule = _linker.getModule(); const Target *march = TargetRegistry::lookupTarget(Triple, errMsg); if ( march == NULL ) return true; @@ -343,7 +342,7 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) // construct LTModule, hand over ownership of module and target std::string FeatureStr = getFeatureString(Triple.c_str()); - _target = march->createTargetMachine(*mergedModule, Triple, FeatureStr); + _target = march->createTargetMachine(Triple, FeatureStr); } return false; } diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 8fca056afc2..cbfb04861f5 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -162,7 +162,7 @@ LTOModule* LTOModule::makeLTOModule(MemoryBuffer* buffer, // construct LTModule, hand over ownership of module and target std::string FeatureStr = getFeatureString(Triple.c_str()); - TargetMachine* target = march->createTargetMachine(*m, Triple, FeatureStr); + TargetMachine* target = march->createTargetMachine(Triple, FeatureStr); return new LTOModule(m.take(), target); }