diff options
Diffstat (limited to 'include/flang/Frontend/FrontendAction.h')
-rw-r--r-- | include/flang/Frontend/FrontendAction.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/flang/Frontend/FrontendAction.h b/include/flang/Frontend/FrontendAction.h index b9f236b688..bd52e44fe8 100644 --- a/include/flang/Frontend/FrontendAction.h +++ b/include/flang/Frontend/FrontendAction.h @@ -33,7 +33,7 @@ class CompilerInstance; /// Abstract base class for actions which can be performed by the frontend. class FrontendAction { - OwningPtr<ASTUnit> CurrentASTUnit; + llvm::OwningPtr<ASTUnit> CurrentASTUnit; CompilerInstance *Instance; private: @@ -124,13 +124,11 @@ public: } const StringRef getCurrentFile() const { - assert(!CurrentInput.isEmpty() && "No current file!"); - return CurrentInput.getFile(); + CurrentASTUnit.get()->getOriginalSourceFileName(); } InputKind getCurrentFileKind() const { - assert(!CurrentInput.isEmpty() && "No current file!"); - return CurrentInput.getKind(); + return IK_None; } ASTUnit &getCurrentASTUnit() const { |