[cfe-commits] r134128 - in /cfe/trunk: lib/CodeGen/BackendUtil.cpp tools/driver/cc1as_main.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jun 29 19:06:32 PDT 2011
Author: evancheng
Date: Wed Jun 29 21:06:32 2011
New Revision: 134128
URL: http://llvm.org/viewvc/llvm-project?rev=134128&view=rev
Log:
createTargetMachine now takes a CPU string.
Modified:
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/tools/driver/cc1as_main.cpp
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=134128&r1=134127&r2=134128&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Wed Jun 29 21:06:32 2011
@@ -258,16 +258,16 @@
const_cast<char **>(&BackendArgs[0]));
std::string FeaturesStr;
- if (TargetOpts.CPU.size() || TargetOpts.Features.size()) {
+ if (TargetOpts.Features.size()) {
SubtargetFeatures Features;
- Features.setCPU(TargetOpts.CPU);
for (std::vector<std::string>::const_iterator
it = TargetOpts.Features.begin(),
ie = TargetOpts.Features.end(); it != ie; ++it)
Features.AddFeature(*it);
FeaturesStr = Features.getString();
}
- TargetMachine *TM = TheTarget->createTargetMachine(Triple, FeaturesStr);
+ TargetMachine *TM = TheTarget->createTargetMachine(Triple, TargetOpts.CPU,
+ FeaturesStr);
if (CodeGenOpts.RelaxAll)
TM->setMCRelaxAll(true);
Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=134128&r1=134127&r2=134128&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Wed Jun 29 21:06:32 2011
@@ -261,7 +261,8 @@
return false;
// FIXME: We shouldn't need to do this (and link in codegen).
- OwningPtr<TargetMachine> TM(TheTarget->createTargetMachine(Opts.Triple, ""));
+ OwningPtr<TargetMachine> TM(TheTarget->createTargetMachine(Opts.Triple,
+ "", ""));
if (!TM) {
Diags.Report(diag::err_target_unknown_triple) << Opts.Triple;
return false;
More information about the cfe-commits
mailing list