mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 17:02:03 +00:00
Added code to avoid checking for .bc when the filename is too short.
llvm-svn: 8190
This commit is contained in:
parent
a42a115cb9
commit
65e849241f
@ -44,7 +44,8 @@ GetFileNameRoot(const std::string &InputFilename)
|
||||
std::string IFN = InputFilename;
|
||||
std::string outputFilename;
|
||||
int Len = IFN.length();
|
||||
if (IFN[Len-3] == '.' && IFN[Len-2] == 'b' && IFN[Len-1] == 'c') {
|
||||
if ((Len > 2) &&
|
||||
IFN[Len-3] == '.' && IFN[Len-2] == 'b' && IFN[Len-1] == 'c') {
|
||||
outputFilename = std::string(IFN.begin(), IFN.end()-3); // s/.bc/.s/
|
||||
} else {
|
||||
outputFilename = IFN;
|
||||
|
Loading…
Reference in New Issue
Block a user