Targets now configure themselves with the module, not flags
authorChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 19:50:12 +0000 (19:50 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 19:50:12 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8133 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llc/llc.cpp

index 631ac99bd6cdd6e6fcfac9ce7237baf3fac903c4..9673343306782782fda99f2501e0ddcb0272990a 100644 (file)
@@ -68,7 +68,7 @@ int main(int argc, char **argv) {
 
   // Allocate target machine.  First, check whether the user has
   // explicitly specified an architecture to compile for.
-  TargetMachine* (*TargetMachineAllocator)(unsigned) = 0;
+  TargetMachine* (*TargetMachineAllocator)(const Module&) = 0;
   switch (Arch) {
   case x86:
     TargetMachineAllocator = allocateX86TargetMachine;
@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
     } 
     break;
   }
-  std::auto_ptr<TargetMachine> target((*TargetMachineAllocator)(0));
+  std::auto_ptr<TargetMachine> target(TargetMachineAllocator(mod));
   assert(target.get() && "Could not allocate target machine!");
   TargetMachine &Target = *target.get();
   const TargetData &TD = Target.getTargetData();