summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-07-04 20:02:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-07-04 20:02:42 +0000
commitc75c4fad469022949df46faf22dbc3aad6d1624c (patch)
tree30ebcf04caf51d45c3f2a84d8fde76cafa124af7 /llvm/lib/LTO
parent69bf48eeb153b8f9346b1d0c6a347cb2f59d267e (diff)
downloadbcm5719-llvm-c75c4fad469022949df46faf22dbc3aad6d1624c.tar.gz
bcm5719-llvm-c75c4fad469022949df46faf22dbc3aad6d1624c.zip
Revert "Convert a few std::strings to StringRef."
This reverts commit r212342. We can get a StringRef into the current Record, but not one in the bitcode itself since the string is compressed in it. llvm-svn: 212356
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTOModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 2fa450fd9d9..5b3057177e2 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -63,8 +63,8 @@ bool LTOModule::isBitcodeFile(const char *path) {
bool LTOModule::isBitcodeForTarget(MemoryBuffer *buffer,
StringRef triplePrefix) {
- StringRef Triple = getBitcodeTargetTriple(buffer, getGlobalContext());
- return Triple.startswith(triplePrefix);
+ std::string Triple = getBitcodeTargetTriple(buffer, getGlobalContext());
+ return StringRef(Triple).startswith(triplePrefix);
}
LTOModule *LTOModule::createFromFile(const char *path, TargetOptions options,
OpenPOWER on IntegriCloud