diff options
author | Stuart Hastings <stuart@apple.com> | 2009-07-15 17:27:11 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2009-07-15 17:27:11 +0000 |
commit | 2286f8dc4cec0625f7d7a14e2570926cf8599646 (patch) | |
tree | 2443581013659cf94139995c03b6883ff4ab43db /lib/Target/CBackend/CBackend.cpp | |
parent | 7fe3dd5b7ea9ef7d3cfd6d26dfdd7ddf49718339 (diff) | |
download | external_llvm-2286f8dc4cec0625f7d7a14e2570926cf8599646.tar.gz external_llvm-2286f8dc4cec0625f7d7a14e2570926cf8599646.tar.bz2 external_llvm-2286f8dc4cec0625f7d7a14e2570926cf8599646.zip |
Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index b1361e8c26..caf91c882e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -30,10 +30,9 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/Transforms/Scalar.h" +#include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Target/TargetRegistry.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CFG.h" #include "llvm/Support/ErrorHandling.h" @@ -59,8 +58,7 @@ extern "C" int CBackendTargetMachineModule; int CBackendTargetMachineModule = 0; // Register the target. -extern Target TheCBackendTarget; -static RegisterTarget<CTargetMachine> X(TheCBackendTarget, "c", "C backend"); +static RegisterTarget<CTargetMachine> X("c", "C backend"); // Force static initialization. extern "C" void LLVMInitializeCBackendTarget() { } @@ -3188,27 +3186,27 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) { const char *const *table = 0; - // Grab the translation table from TargetAsmInfo if it exists. + //Grab the translation table from TargetAsmInfo if it exists if (!TAsm) { std::string E; - const Target *Match = - TargetRegistry::getClosestStaticTargetForModule(*TheModule, E); + const TargetMachineRegistry::entry* Match = + TargetMachineRegistry::getClosestStaticTargetForModule(*TheModule, E); if (Match) { - // Per platform Target Machines don't exist, so create it; - // this must be done only once. - const TargetMachine* TM = Match->createTargetMachine(*TheModule, ""); + //Per platform Target Machines don't exist, so create it + // this must be done only once + const TargetMachine* TM = Match->CtorFn(*TheModule, ""); TAsm = TM->getTargetAsmInfo(); } } if (TAsm) table = TAsm->getAsmCBE(); - // Search the translation table if it exists. + //Search the translation table if it exists for (int i = 0; table && table[i]; i += 2) if (c.Codes[0] == table[i]) return table[i+1]; - // Default is identity. + //default is identity return c.Codes[0]; } |