diff options
author | Steve Naroff <snaroff@apple.com> | 2009-09-03 18:19:54 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-09-03 18:19:54 +0000 |
commit | 77accc11f04ed4ff9afd4e27d430144d4714be56 (patch) | |
tree | 91cb0f223d2dee93dc71478d546ef2fa1b41d8fc /lib/Frontend/ASTUnit.cpp | |
parent | a38c687ef5354678b9d76a7b29354159f2b83736 (diff) |
Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 8143263ca2..d04f785ebe 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -77,6 +77,9 @@ public: } // anonymous namespace +const std::string &ASTUnit::getOriginalSourceFileName() { + return dyn_cast<PCHReader>(Ctx->getExternalSource())->getOriginalSourceFile(); +} ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename, FileManager &FileMgr, |