[llvm] r260469 - Fix Windows bot failure in Transforms/FunctionImport/funcimport.ll
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 15:47:38 PST 2016
Author: tejohnson
Date: Wed Feb 10 17:47:38 2016
New Revision: 260469
URL: http://llvm.org/viewvc/llvm-project?rev=260469&view=rev
Log:
Fix Windows bot failure in Transforms/FunctionImport/funcimport.ll
Make sure we split ":" from the end of the global function id (which
is <path>:<function> for local functions) instead of the beginning to
avoid splitting at the wrong place for Windows file paths that contain
a ":".
Modified:
llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=260469&r1=260468&r2=260469&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Wed Feb 10 17:47:38 2016
@@ -252,7 +252,7 @@ GetImportList(Module &DestModule,
// source file name prepended for functions that were originally local
// in the source module. Strip any prepended name to recover the original
// name in the source module.
- std::pair<StringRef, StringRef> Split = CalledFunctionName.split(":");
+ std::pair<StringRef, StringRef> Split = CalledFunctionName.rsplit(':');
SGV = SrcModule.getNamedValue(Split.second);
assert(SGV && "Can't find function to import in source module");
}
More information about the llvm-commits
mailing list