[llvm] r212343 - Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jul 4 07:19:41 PDT 2014
Author: rafael
Date: Fri Jul 4 09:19:41 2014
New Revision: 212343
URL: http://llvm.org/viewvc/llvm-project?rev=212343&view=rev
Log:
Change LTOModule`s getTargetTriple and setTargetTriple to use c++ types.
Modified:
llvm/trunk/include/llvm/LTO/LTOModule.h
llvm/trunk/tools/lto/lto.cpp
Modified: llvm/trunk/include/llvm/LTO/LTOModule.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LTO/LTOModule.h?rev=212343&r1=212342&r2=212343&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LTO/LTOModule.h (original)
+++ llvm/trunk/include/llvm/LTO/LTOModule.h Fri Jul 4 09:19:41 2014
@@ -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
Modified: llvm/trunk/tools/lto/lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=212343&r1=212342&r2=212343&view=diff
==============================================================================
--- llvm/trunk/tools/lto/lto.cpp (original)
+++ llvm/trunk/tools/lto/lto.cpp Fri Jul 4 09:19:41 2014
@@ -149,7 +149,7 @@ lto_module_t lto_module_create_from_memo
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) {
More information about the llvm-commits
mailing list