diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-24 06:57:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-24 06:57:14 +0000 |
commit | d8e3083840fef752d11ca183f42786470ed061e3 (patch) | |
tree | 9ef03e5fc1e183197e3fa18c35ca7de5cb472a09 /Basic/SourceManager.cpp | |
parent | 1cf12bfa80825cce46be35a0a2b54f281b0b51db (diff) |
Use a smallstring instead of an std::string in FileChanged to avoid some malloc traffic.
This speeds up -E on xalancbmk by 2.4%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Basic/SourceManager.cpp')
-rw-r--r-- | Basic/SourceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Basic/SourceManager.cpp b/Basic/SourceManager.cpp index e53547087d..df13fad37c 100644 --- a/Basic/SourceManager.cpp +++ b/Basic/SourceManager.cpp @@ -231,7 +231,7 @@ unsigned SourceManager::getColumnNumber(SourceLocation Loc) const { /// getSourceName - This method returns the name of the file or buffer that /// the SourceLocation specifies. This can be modified with #line directives, /// etc. -std::string SourceManager::getSourceName(SourceLocation Loc) { +const char *SourceManager::getSourceName(SourceLocation Loc) { unsigned FileID = Loc.getFileID(); if (FileID == 0) return ""; return getFileInfo(FileID)->Buffer->getBufferIdentifier(); |