[llvm] r227532 - [llvm-lto] Add a line for setting LTOCodeGenerator's CPU string from command

Akira Hatanaka ahatanaka at apple.com
Thu Jan 29 17:14:29 PST 2015


Author: ahatanak
Date: Thu Jan 29 19:14:28 2015
New Revision: 227532

URL: http://llvm.org/viewvc/llvm-project?rev=227532&view=rev
Log:
[llvm-lto] Add a line for setting LTOCodeGenerator's CPU string from command
line.

This is needed for a test case I plan to commit later.

Modified:
    llvm/trunk/tools/llvm-lto/llvm-lto.cpp

Modified: llvm/trunk/tools/llvm-lto/llvm-lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto/llvm-lto.cpp?rev=227532&r1=227531&r2=227532&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto/llvm-lto.cpp (original)
+++ llvm/trunk/tools/llvm-lto/llvm-lto.cpp Thu Jan 29 19:14:28 2015
@@ -217,6 +217,9 @@ int main(int argc, char **argv) {
   for (unsigned i = 0; i < KeptDSOSyms.size(); ++i)
     CodeGen.addMustPreserveSymbol(KeptDSOSyms[i].c_str());
 
+  // Set cpu and attrs strings for the default target/subtarget.
+  CodeGen.setCpu(MCPU.c_str());
+
   std::string attrs;
   for (unsigned i = 0; i < MAttrs.size(); ++i) {
     if (i > 0)





More information about the llvm-commits mailing list