Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77927 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 6e71d3b..84f7c11 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -51,7 +51,7 @@
extern "C" void LLVMInitializeCBackendTarget() {
// Register the target.
- RegisterTargetMachine<CTargetMachine> X(TheCBackendTarget);
+ RegisterTargetMachineDeprecated<CTargetMachine> X(TheCBackendTarget);
}
namespace {
diff --git a/lib/Target/CBackend/CTargetMachine.h b/lib/Target/CBackend/CTargetMachine.h
index a3052ab..72146a8 100644
--- a/lib/Target/CBackend/CTargetMachine.h
+++ b/lib/Target/CBackend/CTargetMachine.h
@@ -22,7 +22,8 @@
struct CTargetMachine : public TargetMachine {
const TargetData DataLayout; // Calculates type size & alignment
- CTargetMachine(const Target &T, const Module &M, const std::string &FS)
+ CTargetMachine(const Target &T, const Module &M,
+ const std::string &FS)
: TargetMachine(T), DataLayout(&M) {}
virtual bool WantsWholeFile() const { return true; }