Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-07-04 14:19:41 +00:00
parent 9f72a18a50
commit a593909c3d
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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) {