aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-07-04 14:19:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-07-04 14:19:41 +0000
commitd749fb5129fe75246c984bf7771bd62906a4b3cc (patch)
tree7bdfc443e156d6d73b441da0860f4e5aea4e585d
parentf98536a04638b2ba4662e11b12b29ea8d7e1aa25 (diff)
downloadllvm-d749fb5129fe75246c984bf7771bd62906a4b3cc.zip
llvm-d749fb5129fe75246c984bf7771bd62906a4b3cc.tar.gz
llvm-d749fb5129fe75246c984bf7771bd62906a4b3cc.tar.bz2
Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.
llvm-svn: 212343
-rw-r--r--llvm/include/llvm/LTO/LTOModule.h8
-rw-r--r--llvm/tools/lto/lto.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/LTO/LTOModule.h b/llvm/include/llvm/LTO/LTOModule.h
index 2f1f3c2..509b84e 100644
--- a/llvm/include/llvm/LTO/LTOModule.h
+++ b/llvm/include/llvm/LTO/LTOModule.h
@@ -101,13 +101,13 @@ public:
StringRef path = "");
/// Return the Module's target triple.
- const char *getTargetTriple() {
- return _module->getTargetTriple().c_str();
+ const std::string &getTargetTriple() {
+ return _module->getTargetTriple();
}
/// Set the Module's target triple.
- void setTargetTriple(const char *triple) {
- _module->setTargetTriple(triple);
+ void setTargetTriple(StringRef Triple) {
+ _module->setTargetTriple(Triple);
}
/// Get the number of symbols
diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp
index 8df7315..b3f5938 100644
--- a/llvm/tools/lto/lto.cpp
+++ b/llvm/tools/lto/lto.cpp
@@ -149,7 +149,7 @@ lto_module_t lto_module_create_from_memory_with_path(const void* mem,
void lto_module_dispose(lto_module_t mod) { delete unwrap(mod); }
const char* lto_module_get_target_triple(lto_module_t mod) {
- return unwrap(mod)->getTargetTriple();
+ return unwrap(mod)->getTargetTriple().c_str();
}
void lto_module_set_target_triple(lto_module_t mod, const char *triple) {