diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 22:16:29 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-02 22:16:29 +0000 |
commit | 8a8d479214745c82ef00f08d4e4f1c173b5f9ce2 (patch) | |
tree | db4233da588d41bdf07d31520db63e841eb5dce4 /tools/lto | |
parent | c4f0b309eeaa479de9bbf62eaf304931a526f622 (diff) | |
download | external_llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.zip external_llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.tar.gz external_llvm-8a8d479214745c82ef00f08d4e4f1c173b5f9ce2.tar.bz2 |
Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.
One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 3 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 9093073..77d7dfe 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -265,7 +265,8 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) SubtargetFeatures Features; Features.getDefaultSubtargetFeatures(llvm::Triple(Triple)); std::string FeatureStr = Features.getString(); - _target = march->createTargetMachine(Triple, _mCpu, FeatureStr, + TargetOptions Options; + _target = march->createTargetMachine(Triple, _mCpu, FeatureStr, Options, RelocModel); } return false; diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 8ea680d..0b73729 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -159,7 +159,9 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer, Features.getDefaultSubtargetFeatures(llvm::Triple(Triple)); std::string FeatureStr = Features.getString(); std::string CPU; - TargetMachine *target = march->createTargetMachine(Triple, CPU, FeatureStr); + TargetOptions Options; + TargetMachine *target = march->createTargetMachine(Triple, CPU, FeatureStr, + Options); LTOModule *Ret = new LTOModule(m.take(), target); if (Ret->ParseSymbols(errMsg)) { delete Ret; |