summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-15 10:05:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-15 10:05:03 +0000
commita8d73996ceaa6a3fcc51993a4895c45d05b42c98 (patch)
tree6be1bc95132f855881edb0d908a076eca6a9df6e /llvm/lib/Target/CBackend/CBackend.cpp
parent776fe8db5f09cf55ae7aab2dbf546e01034f4352 (diff)
downloadbcm5719-llvm-a8d73996ceaa6a3fcc51993a4895c45d05b42c98.tar.gz
bcm5719-llvm-a8d73996ceaa6a3fcc51993a4895c45d05b42c98.zip
Switch some obvious clients to using the new TargetRegistry.
llvm-svn: 75767
Diffstat (limited to 'llvm/lib/Target/CBackend/CBackend.cpp')
-rw-r--r--llvm/lib/Target/CBackend/CBackend.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index 1eeee99151c..b1361e8c268 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -30,9 +30,10 @@
#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"
@@ -3187,27 +3188,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 TargetMachineRegistry::entry* Match =
- TargetMachineRegistry::getClosestStaticTargetForModule(*TheModule, E);
+ const Target *Match =
+ TargetRegistry::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->CtorFn(*TheModule, "");
+ // Per platform Target Machines don't exist, so create it;
+ // this must be done only once.
+ const TargetMachine* TM = Match->createTargetMachine(*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];
}
OpenPOWER on IntegriCloud